Author Topic: Jumbled Chinese characters in plaintext file  (Read 71 times)

bogedo

  • Community Member
  • Posts: 35
  • Hero Points: 0
Jumbled Chinese characters in plaintext file
« on: September 12, 2024, 04:28:16 PM »
when opening the attached file, the Chinese characters are jumbled. this is with Auto Unicode2 Utf-8 selected under Encoding for the plaintext language mode. setting the encoding to Chinese Simplified GB2312 results in the characters displaying as they should.
interestingly, the same file opens correctly in Notepad++; it detects the language automatically and applies the correct encoding to the file.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6934
  • Hero Points: 531
Re: Jumbled Chinese characters in plaintext file
« Reply #1 on: September 12, 2024, 09:57:35 PM »
At the moment, SlickEdit's auto encoding detection doesn't detect any code pages. SlickEdit has a lot of detection for unicode encodings (Utf-8, Utf-16, UTf-32).  However, on Windows, if you set the default code page to Chinese Simplified GB2312, then SlickEdit would correctly display this file. Also, you could create a new text file, enter characters from the Chinese Simplified GB2312 code page and save it and the resulting file would be saved in the Chinese Simplified GB2312 code page.

At this point, it's best to use a Unicode encoding to avoid issues with new files you create. Interestingly, the Windows default code page can be configured to be Utf-8 but I think it's still considered experimental (SlickEdit supports it).
« Last Edit: September 13, 2024, 08:42:33 PM by Clark »

bogedo

  • Community Member
  • Posts: 35
  • Hero Points: 0
Re: Jumbled Chinese characters in plaintext file
« Reply #2 on: September 13, 2024, 01:29:07 PM »
Thank you for getting back to me on this issue and also for the tips, i now have a bit of an understanding of the issue.
i have tried setting the default Windows code page to Utf-8 but i still see the same issue when opening the attached file. is detecting code pages something that you are actively looking into for SlickEdit's auto encoding detection ? if not please seriously consider looking into it because from time to time we may come across files that have different code pages than the default ones on our systems and it would be nice if SlickEdit took care of detecting the code page of a file and applying the suitable encoding for them.