It is currently August 17th, 2019, 9:54 pm

Atom

Discussion about the documentation, main Rainmeter site and forums.
User avatar
jsmorley
Developer
Posts: 19370
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Atom

jsmorley » December 19th, 2017, 6:27 pm

raiguard wrote:I converted all my skins back to UTF-8 once CR variables became a thing. It makes the files smaller, and it plays nicer with GitHub (GitHub can’t compare code changes in UTF-16 LE files for some reason).

Is there some overarching reason why using UTF-8 is a bad idea?

Rainmeter can't read UTF-8 w/BOM. If you use UTF-8 w/o BOM and don't use any Unicode characters in it, it will be identical to ANSI and that is ok. However, as soon as you put a Unicode character in it, it will save as UTF-8 w/BOM and won't work, in addition, if you use characters from the Extended ASCII set, above decimal 127, those are locale / codepage specific, and you might not get the same resulting characters on someone else's computer in another country.

Using inline [\xxxx] character references in place of Unicode will allow you to stay with UTF-8 w/o BOM, as it will be seen as ANSI, but you are going to have to be careful, and it feels like a lot of effort to NEVER be able to just paste in a Unicode character, and always worry about foreign character sets.

UTF-8 in general is a very bad idea for Rainmeter skins. They should always be UFT-16 LE.

You are free to do as you wish of course, but using UTF-8 is not something I would allow as a general recommendation on the forums. The community is just too international to depend on the ASCII character set. What is commonly referred to as ANSI, which is really a very limited UTF-8 w/o BOM, is just so old-school that it's creepy. It's not the 1960's anymore, and America is not the only country with computers. Your terminal is not a line printer connected to a 300-baud modem.

As for GitHub, that is regrettable, but not a concern for 99% of our users. The issue is that GitHub is not git, it a website that acts as a front-end for git. Websites prefer UTF-8 w/BOM as it impacts bandwidth (not so much size, that is trivial) so it makes sense that they would want that.
User avatar
MarcoPixel
Posts: 40
Joined: June 8th, 2012, 9:43 am
Location: Austria

Re: Atom

MarcoPixel » December 19th, 2017, 7:42 pm

jsmorley wrote:Rainmeter can't read UTF-8 w/BOM. If you use UTF-8 w/o BOM and don't use any Unicode characters in it, it will be identical to ANSI and that is ok. However, as soon as you put a Unicode character in it, it will save as UTF-8 w/BOM and won't work, in addition, if you use characters from the Extended ASCII set, above decimal 127, those are locale / codepage specific, and you might not get the same resulting characters on someone else's computer in another country.

Using inline [\xxxx] character references in place of Unicode will allow you to stay with UTF-8 w/o BOM, as it will be seen as ANSI, but you are going to have to be careful, and it feels like a lot of effort to NEVER be able to just paste in a Unicode character, and always worry about foreign character sets.

UTF-8 in general is a very bad idea for Rainmeter skins. They should always be UFT-16 LE.

You are free to do as you wish of course, but using UTF-8 is not something I would allow as a general recommendation on the forums. The community is just too international to depend on the ASCII character set. What is commonly referred to as ANSI, which is really a very limited UTF-8 w/o BOM, is just so old-school that it's creepy. It's not the 1960's anymore, and America is not the only country with computers. Your terminal is not a line printer connected to a 300-baud modem.

As for GitHub, that is regrettable, but not a concern for 99% of our users. The issue is that GitHub is not git, it a website that acts as a front-end for git. Websites prefer UTF-8 w/BOM as it impacts bandwidth (not so much size, that is trivial) so it makes sense that they would want that.
Well the issues lie in both Git and Github as both are using GNU Diff which doesn't support multibyte characters. If you change the difftool (which you can do) you could get it properly working, but it will be much harder to collaborate as you can't change it on Github.

Source: https://stackoverflow.com/a/17522818/9119736