Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the Sakura editor, you can have a .txt file with UTF-8 encoding, which contains 2 characters that are not available in EUC charset.

When I saved a .txt from UTF-8 to EUC in the editor, it all works well and all characters are displayed properly.

Does anybody know what logic the editor is using to accomplish this?

share|improve this question

migrated from Jul 16 '10 at 12:56

This question came from our site for professional and enthusiast programmers.

I'm not following your question fully. What are your 2 characters which "are not available in EUC"? The source for this app is available here:…. I'm sure charcode.cpp/.h have what you're after. You can probably get the functionality you want from libiconv too. – Mark H Jul 16 '10 at 12:08

which contains 2 characters which are not available in EUC charset

If you are seeing two characters ÿþ (hex FF FE) or þÿ (hex FE FF) at the beginning of the first line, then the file is encoded in UTF-16, not UTF-8. These characters are then actually the "byte-order mark" (BOM), which the editor should interpret, not show.

(Just in case you see three characters , being hex EF BB BF, at the start of the first line, then that is the BOM for UTF-8. If you are seeing other characters, or not at the start of the first line, can you please edit your question to add some example?)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.