开发者

Tips on unicode text editors

开发者 https://www.devze.com 2023-04-05 14:43 出处:网络
I am currently converting a legacy system to a new platform and need to extract strings from the old systems resource files.

I am currently converting a legacy system to a new platform and need to extract strings from the old systems resource files.

The old system was written in Delphi and the开发者_如何转开发 strings are kept in files called .dfm. I have no trouble locating the strings and for English and other European languages there is no problem. The trouble comes when I try to extract strings in Japanese. I have used Notepad++ and it seems to me that the program don´t recognice the correct encoding. I get Japanese symbols but they don´t seem to match what is in the GUI. Notepad++ shows signs in something called GB2312(Simplified Chinese). But it looks weird.

My question is, does anyone have any tips on programs/text editors that are good at operations like this? Also I'm grateful for any tips that might help me along the way.


Assuming that your issue is simply that Notepad++ is incorrectly guessing the encoding you can solve the problem by manually setting the encoding in Notepad++, like this:

Tips on unicode text editors


Notepad++ itself already handles encoding issues. To make it to desired encoding, like Unicode;

  1. first, copy all the contents of the file,
  2. choose Unicode without BOM in the menu,
  3. last, replace all contents with copied contents
  4. save the file

Your contents will then be in your desired encoding.


Strings are kept not [just] in DFMs in Delphi. Only forms and associated text are. So you would to review all the code as well.

As for DFMs - before Delphi 2009 DFMs didn't use Unicode so you must know what charset was used. That was one of big problems with localization and internationalization of Delphi applications.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号