No idea why it sends '»' on some places and 'В»'
#1

In my script i use this '»' in strings before sending a message this show that this message is from the server. At some places this message is displayed as '»' and in some 'В»'

The behivaour? It's 'В»' this message is displayed mostly, while '»' is only shown from the scripts which i use by including in my main script... #include <...Shop....> (Just an example) etc.

I did notice that it sends 'В»' for the messages which are from .pwn and not from .inc files? Pretty odd? I tried changing my main script to .pwn but no luck.

Example of 'В»'
pawn Код:
format(string,sizeof(string),"» %s AKA: No Results Found.",targetip);
Example of '»'
pawn Код:
'format(string,sizeof(string),"» %s (%d) has teleported to last checkpoint using (/lcp).",name,playerid);
Reply
#2

It might be possible that it's defined at top of your script? or it might be that your incs save as a different Unicode as your main script.
this issue is not script related and most probably goes to your extra languages and unicodes.
Reply
#3

Great! Thanks for help.

I was using UTF-8, just selected ANSI from notpad++ and it displayed that 'В' character! thanks for help.
Reply
#4

Yeah. I've the same problem on Sublime Text 3. With », «, й (display Г©), к (ГЄ), etc.. There is no ANSI (or I missed something) so I selected Western (Windows 1252) and it's working. If anyone have a better solution?
Reply
#5

Every character is one single byte. As you know a byte has only 256 possible values (0-255). The byte you enter in your editor (e.g. pawno) is presented to you based on your activated locale/codepage on your machine (****** for "how to set windows locale" if you want to change your locale). Depending on the players' locale, it may appear differently for them.

Most editors (except pawno) have an option to change the locale/encoding from within the editor. Most western countries default to codepage 1252. Editors often use UTF-8 which allows multibyte characters(which opens up a wider selection of available characters), but these are not available in most codepages.
Reply
#6

http://www.noelshack.com/2016-49-1481280530-there.png
If you don't have this, ****** it.
Reply


Forum Jump:


Users browsing this thread: