Raised This Month: $ Target: $400
 0% 

javascript unescape ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-31-2010 , 15:52   Re: javascript unescape ?
Reply With Quote #1

Notice you are using 00DC, which is a hexadecimal number.
In Pawn, you can use hexadecimal numbers instead of base10 numbers.

I assume you know how strings work:
Code:
new szString[ 4 ]; // max 3 chars with the last array index as ^0 // since strings must have a null terminator szString[ 0 ] = 'c'; szString[ 1 ] = 'a'; szString[ 2 ] = 't'; // characters can also be represented as numbers szString[ 0 ] = 99; szString[ 1 ] = 97; szString[ 2 ] = 116; // now, to use hexadecimal numbers szString[ 0 ] = 0x63; szString[ 1 ] = 0x61; szString[ 2 ] = 0x74;
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ÜnLoCo
Member
Join Date: Dec 2009
Location: 35.77N, 10.82E
Old 06-01-2010 , 23:38   Re: javascript unescape ?
Reply With Quote #2

:S thank you !!!
i will try replacing \uXXXX with 0xXXXX and c
__________________

Last edited by ÜnLoCo; 06-01-2010 at 23:45.
ÜnLoCo is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 06-02-2010 , 19:12   Re: javascript unescape ?
Reply With Quote #3

Quote:
Originally Posted by ÜnLoCo View Post
:S thank you !!!
i will try replacing \uXXXX with 0xXXXX and c
Looks like you can use this syntax for strings in Pawn:
Code:
new string[] = {0x00DC, "Loco"};

It compiles, I haven't tested the output.
Seta00 is offline
Old 06-03-2010, 04:21
SnoW
This message has been deleted by SnoW.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:19.


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