So i’m spanish but i ALWAYS code in english, because when i started coding using non-english characters (even using UTF-8) like “ñ” “áéíóú” etc gave issues (at least in Java) when changing from one system to another, i’m curious if this still happens or if it could happen in C# or it’s perfectly safe to… let’s say call a method “miMétodo() {…}” or “getTamaño() {…}”
I’ll probably keep working on english but i’d like to know =D
Thanks!
You could just try it, add some of these to the code and see if it compiles. It seems to work on mine at least.
It’s possible you might run into bugs with debug tools down the road if any one link in the chain doesn’t support UTF, but if your code editor and the Unity compiler work fine, then most likely these issues would result in not much worse than hard to read debug logs. (and if so, file a bug report with the debug tool in question, because there’s really no excuse to not support UTF in 2021!)
2 Likes
C# has had good unicode support since as long as I remember. C++ on the other hand is a much older language, and has had a much more difficult struggle with unicode support. C++ predates the creation of unicode itself, and the wide adoption of unicode by about 15 years or so.
I point this out because most of the guts of the Unity engine is written in C++, and Unity occasionally gets regressions with their support of non-ascii characters. I’d venture a guess those aren’t two completely unrelated points. I see threads most often involving issues with non-ascii filenames or file paths.
So personally, I try to stay away from non-ascii characters, even though they are supported, just because it is one less potential headache to deal with. YMMV
2 Likes