Raised This Month: $ Target: $400
 0% 

[REG] Add ANSI to UTf8 native


  
 
 
Thread Tools Display Modes
Author Message
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 02-11-2007 , 14:38   [REG] Add ANSI to UTf8 native
#1

Add ANSI to UTf8 native
Add Utf8 to ANSI native

I find a function in amx.cpp "amx_UTF8Put".

Can you export as amxx native and add UTF8toANSI function?

It's very useful for using multilingual user.

thanks.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
BAILOPAN
Join Date: Jan 2004
Old 02-11-2007 , 16:25   Re: [REG] Add ANSI to UTf8 native
#2

These functions don't really do what I think you want them to do. Why do you need UTF-8 specific functions? Although AMX Mod X does not support UTF-8, most functions should be able to use it by default (except for the isalpha, isspace, etc functions).

What are you trying to do?
__________________
egg
BAILOPAN is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 02-11-2007 , 21:09   Re: [REG] Add ANSI to UTf8 native
#3

For example:
Code:
   new msg[] = "friends=老友记"
   client_print(id, print_chat, msg)
1: save file as ANSI and compile it. Screen display: "friends=" // miss "老友记"
2: save file as UTF8(no BOM) and compile it. Screen display: "friends=老友记" // we alway do this before

if we have native like format_utf8(....)
we can do like this:
Code:
   new utf8String[64], msg[] = "friends=老友记"
   format_utf8(utf8String,63,msg)
   client_print(id, print_chat, utf8String)
save file as ANSI and compile it. Screen display: "friends=老友记"
It is useful when reading lang file and no need to save whole file as utf8.

Actually, I am already done this kind of native by self(works but badly C++ coding).
So if you still think is not realy need it, lock. thanks
__________________
QQ31537639

Last edited by jopmako; 02-11-2007 at 21:13.
jopmako is offline
Send a message via MSN to jopmako
Ingram
Veteran Member
Join Date: May 2004
Old 02-11-2007 , 22:57   Re: [REG] Add ANSI to UTf8 native
#4

I'm confused... isn't ANSI just English and European languages? isn't that why they made Unicode? If so, how can you expect the file to save as ANSI?

Last edited by Ingram; 02-11-2007 at 23:00.
Ingram is offline
BAILOPAN
Join Date: Jan 2004
Old 02-11-2007 , 23:16   Re: [REG] Add ANSI to UTf8 native
#5

I'm confused... the reason it's not working is because you're not saving as UTF-8. The encoding will be wrong with ANSI. You shouldn't need a new native, just save as UTF-8.
__________________
egg
BAILOPAN is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 02-12-2007 , 09:20   Re: [REG] Add ANSI to UTf8 native
#6

lock it, thank.
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
 



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 20:34.


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