Active Member Mind Rapist 188 Posted December 25, 2018 Active Member Share Posted December 25, 2018 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Spoiler I made this script because I got tired of all the binary warnings about saving the file to Unicode format. So I am now releasing it to the community. This is a Windows PowerShell script that converts all the files of the destination that have the postfix *.cpp and *.h to UTF-8 (without BOM) encoding. I made this script because I got tired of all the binary warnings about saving the file to Unicode format. So I am now releasing it to the community. This is a Windows PowerShell script that converts all the files of the destination that have the postfix *.cpp and *.h to UTF-8 (without BOM) encoding. By default, the file will look inside the directory "C:\Users\user\Documents\" but there is a -Dir parameter you can use (besides editing the file of course). Specify your working directory and wait a few seconds for the process to start. After that, there is really nothing else to do! EXTRA: There is one more parameter you can specify here. A boolean check by the name -Src (disabled by default). If you pass "1" in here the script will automatically check for file extensions *.c and *.hpp (the source files of the Extern folder). 17 1 1 1 5 2 13 Link to comment Share on other sites More sharing options...
Kori 170 Posted December 25, 2018 Share Posted December 25, 2018 Very useful nice Thanks 1 Link to comment Share on other sites More sharing options...
DaCookie -Raven 35 Posted January 31, 2019 Share Posted January 31, 2019 Thanks for the tool. I ran into some errors using the locale_string.txt, because mine can not properly be converted into UTF-8. This is because the korean texts are encoded in cp949 and my local translation has some special characters in ISO-8859-1. Therefore I wrote a small tool converting the korean texts encoded as CP949 into UTF-8 and some european character set ISO-8859-1 into UTF-8. Maybe it is useful for you and you can adjust the character sets for your needs. NOTE: You need iconv by GNU to link this application This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up 13 1 6 5 Link to comment Share on other sites More sharing options...
Active Member Mind Rapist 188 Posted January 31, 2019 Author Active Member Share Posted January 31, 2019 2 minutes ago, DaCookie -Raven said: Thanks for the tool. I ran into some errors using the locale_string.txt, because mine can not properly be converted into UTF-8. This is because the korean texts are encoded in cp949 and my local translation has some special characters in ISO-8859-1. Therefore I wrote a small tool converting the korean texts encoded as CP949 into UTF-8 and some european character set ISO-8859-1 into UTF-8. Maybe it is useful for you and you can adjust the character sets for your needs. NOTE: You need iconv by GNU to link this application iconvpp.h main.cpp Sorry to break it to you but this tool is meant to be used in the Client source only. Because of the locale messages, server source should never be converted to UTF-8 unless it's original encoding was Unicode. If you need a UTF-8 source: Use Vanilla Make an exact copy of your source and convert it using the tool. Then start copying the Korean strings from the non-Unicode to Unicode encoded source, one by one. Best regards Link to comment Share on other sites More sharing options...
DaCookie -Raven 35 Posted January 31, 2019 Share Posted January 31, 2019 1 hour ago, Mind Rapist said: Sorry to break it to you but this tool is meant to be used in the Client source only. Because of the locale messages, server source should never be converted to UTF-8 unless it's original encoding was Unicode. If you need a UTF-8 source: Use Vanilla Make an exact copy of your source and convert it using the tool. Then start copying the Korean strings from the non-Unicode to Unicode encoded source, one by one. Best regards Well I used my IDEs option to convert all server source files to UTF-8. That's why I ran into problems with locale_string.txt Because I`m lazy and don't want to copy the korean strings one by one I wrote this tool. Also it is a nice thing to work with a standard encoding Link to comment Share on other sites More sharing options...
Recommended Posts