Special caracters aren't properly pulled from github.
-
Screeps usually handles special caracters and emoji well when using the ingame editor and console; but when I tried pulling scripts from githubs, they all got messed up. The result looks pretty much like what you'd get when changing the encoding of a text.
On local, I've tried saving the files in a variety of format (UTF-8, ISO-8859, windows-1252); the caracters always looked good when looking at the files on github, but never made it through to screeps. (UTF-16 was the worse: it added a few caracters at the begining of the file, making it unable to run at all.)
-
Uhm git (your client) may automatically convert stuff while uploading, so you need to check your settings.
-
I'm using sourcetree, I'm not familiar with the command line tool. I've had a dive through the settings and didn't find anything on that matter. (Though I should be able to run some commands if you want me to.)
Anyways, I'd bee really surprised if it was sourcetree re-encoding the files before pushing : Everything looks fine on github, and if I re-download and open the files form there, everything is in order and I find them encoded the way I uploaded them.
Do you (or anyone) not have this issue ?
-
I tried creating a new file in the repository directly from Github's website, and as expected, I'm getting the same result a before: github gets the caracters, right but Screeps doesn't.
-
could you post the Charakters in question?
btw, how do you implement them? Copy/paste?
-
You can have a samples in the files here : Test, _Archive.Emoji
The emojis were copy-pasted from Emojipedia. Accentuated caracters are native to my french Azerty keyboard. The other fancier caracters were originally copied from Window's Caracter Table, but then implemented into a custom keyboard language so I could type them directly.
The caracters I'd use the most are
é
,è
,∞
,¡
,¿
-
Ah OK you used them directly in your code, that is not a good idea.
Use the codepoint instead, that is way safer and generally advised on the interwebs.Even then, results may vary because a lot off emoji are very badly standardized and depend on the font which is used.
(Emoji are basically keywords that are displayed with a icon, but it doesn't mean that people have different opinions/interpretations how one should look)a example ️ would be
U+1F5A5
:Desktop = "\u{1F5A5}";
-
Didn't know about that notation. Thank for the tip.
I know I can find some of these codes in the Caracter Table, but otherwise how would I find the code associated with any arbitrary caracter ?
-
windows symbol table under start/utilities
or just google the symbol and write codepoint behind it
Your emoji lib also gives the codepoint if you scroll a bit down.
-
@mrfaul you can also get it by executing
charmap
from the run prompt... ive memorized way to many run commands in windows... smh lol
-
@semperrabbit said in Special caracters aren't properly pulled from github.:
@mrfaul you can also get it by executing
charmap
from the run prompt... ive memorized way to many run commands in windows... smh lolWell that is the essence of a power user, that and keyboard navigation that is so fast that mouse users wonder WTF you are doing
-
@mrfaul yeah, my thing is i hate digging through the start menu. so anything that can be done in the run prompt will be done. and yeah, keyboard shortcuts are clutch. why move your right hand to the mouse if you dont have to. it's just less efficient...