AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   Special Characters - Character set for HL - CS (https://forums.alliedmods.net/showthread.php?t=114798)

01101101 01-07-2010 18:56

Special Characters - Character set for HL - CS
 
I know there are several ways to use this characters, this is just one

Never wanted to use accents or other stuff in your plugins? Here is a way of doing that.

CS uses UTF-8 codification, however, when we write a plugin chances are that use either ANSI or ASCII depending on the editor.

Besides all this technical stuff, its actually pretty simple to use special characters. Just instead of writing for example

PHP Code:

client_print(0print_chat"Te mat"

What, actually won't work

We write

PHP Code:

client_print(0print_chat"Te maté"

And in CS it will apear as

Code:

Te mat
Anyway, this is the list.

Code:

= á
= é
= *
= ó
= ú

= Á
= ‰
= Í
= “
= š

= ñ
= ç

= ‘
= ‡

= ©
= ®
™ = „
= ˜
= ª

= ä
= ë
= ï
= ö
= ü

= „
= ‹
= Ï
= –
= œ



If you want any other character, please tell me.

And, allthough it may look the same the transformation, just copypaste it, will work.

GXLZPGX 01-07-2010 19:05

Re: Special Characters - Character set for HL - CS
 
Ah, I've been looking for this :)

P34nut 01-07-2010 23:30

Re: Special Characters - Character set for HL - CS
 
How can we use a ; in cs?

01101101 01-08-2010 00:24

Re: Special Characters - Character set for HL - CS
 
Quote:

Originally Posted by P34nut (Post 1047259)
How can we use a ; in cs?

Just ; works.

UTF-8 is compatible with ASCII. Any of this chars http://www.asciitable.com/ (ASCII, NOT ASCII EXTENDED) will work without any change.

Exolent[jNr] 01-08-2010 00:25

Re: Special Characters - Character set for HL - CS
 
; looks like a , in the chat.

xPaw 01-08-2010 05:25

Re: Special Characters - Character set for HL - CS
 
Nice trick, good job.

Arkshine 01-08-2010 06:13

Re: Special Characters - Character set for HL - CS
 
If you are going to do that, it would be more appropriate to do a language file, keeping the normal way but saving the file as UTF-8 without BOM. It's easy to do, and easy to add/remove/update sentences.

Owyn 01-08-2010 06:31

Re: Special Characters - Character set for HL - CS
 
just encode your .sma file into UTF-8 , all symbols would appear as they should

ehha 01-08-2010 08:06

Re: Special Characters - Character set for HL - CS
 
Quote:

Originally Posted by Owyn (Post 1047499)
just encode your .sma file into UTF-8 , all symbols would appear as they should

How can I do that?

Owyn 01-08-2010 08:31

Re: Special Characters - Character set for HL - CS
 
notepad -> save as, below name is how it saved ANSI or UTF-8, but you need "UTF-8 without BOM" which isn't there, so i suggest downloading notepad+ then encode menu


All times are GMT -4. The time now is 22:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.