Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Not support utf-8 (and other unicode charset)

2007-04-27
2013-05-29
  • Arthur Dudnik
    Arthur Dudnik
    2007-04-27

    Sample:

    Subject: =?UTF-8?B?W2RvaXRmb3JtZV0gTWVzc2FnZSBmb3IgeW91IGZyb20gdGFzayAi?=
    =?UTF-8?B?0PPx8ero5SDh8+ri+yDiIOfg4+7r7uLq5SIgWzEyMDJd?=

    but source is not utf strings. It is ansii :( IMHO Problem with using char *

     
    • Chip
      Chip
      2007-05-12

      When I decoded the strings above, this is what I get:

      B:\>base64 W2RvaXRmb3JtZV0gTWVzc2FnZSBmb3IgeW91IGZyb20gdGFzayAi

      decodes to:
      [doitforme] Message for you from task "
      5B 64 6F 69 74 66 6F 72 6D 65 5D 20 4D 65 73 73 61 67 65 20 66 6F 72 20 79 6F 75 20 66 72 6F 6D 20 74 61 73 6B 20 22

      B:\>base64 0PPx8ero5SDh8+ri+yDiIOfg4+7r7uLq5SIgWzEyMDJd

      decodes to:
      ╨≤±±ΩΦσ ß≤ΩΓ√ Γ ταπεδεΓΩσ" [1202]
      D0 F3 F1 F1 EA E8 E5 20 E1 F3 EA E2 FB 20 E2 20 E7 E0 E3 EE EB EE E2 EA E5 22 20 5B 31 32 30 32 5D

      B:\>

      I then took the first line of text and saved it with Notepad to a UTF-8 file.  Next, I used debug to add the second line of values to the UTF-8 file as you can see below:

      B:\>debug b:\test.txt
      -d 100 l4a
      0B5A:0100  EF BB BF 5B 64 6F 69 74-66 6F 72 6D 65 5D 20 4D   ...[doitforme] M
      0B5A:0110  65 73 73 61 67 65 20 66-6F 72 20 79 6F 75 20 66   essage for you f
      0B5A:0120  72 6F 6D 20 74 61 73 6B-20 D0 F3 F1 F1 EA E8 E5   rom task .......
      0B5A:0130  20 E1 F3 EA E2 FB 20 E2-20 E7 E0 E3 EE EB EE E2    ..... . .......
      0B5A:0140  EA E5 22 20 5B 31 32 30-32 5D                     .." [1202]
      -q

      B:\>

      When I read that new text file into Notepad, this is what I see on my screen:

      [doitforme] Message for you from task    " [1202]

      Are you able to post to here the command line and all files you use?  It appears the file used for your subject line is not exactly ASCII text, but rather it was saved in a Unicode format, hence the UTF-8 character set encoding.  To be certain, use debug.exe to examine the content of your subject line file, do not use Notepad or other text editor.