-- [ Picked text/plain from multipart/alternative ] Can someone point me in the right direction for converting unicode into utf8 please, i have given it a try, and i just get the same problem :(
Thanks, Olly On 28/03/07, Alfred Reynolds <[EMAIL PROTECTED]> wrote: > > Sounds like you need to load the file as a set of unicode strings and then > do an explicit conversion to UTF8 before sending the string to the client > (that will then convert from UTF8 back into unicode). If you try to treat > the unicode string as a simple char array then you will see the problem you > describe. > > - Alfred > > oLLy wrote: > > -- > > [ Picked text/plain from multipart/alternative ] > > Yes. I am writing a server plugin, so > > 'resource\<mod_name>_<language>.txt' > > is not available to me. > > > > I have been doing some more testing with my own file reader, and it > > seems to > > have no effect, so this is not an issue with KeyFiles. I have managed > > to > > load a Unicode encoded text file into my plugin, and process the > > strings. I > > have stepped through all of the code, and there is no problem with > > accented character files showing while in debug. But once they get > > sent to the > > UserMessage, all of the accented characters are removed. > > > > An example. I have this line in my language file: 'Custom pályára > > szavazás > > kezdése a következokkel' but when it shows in the chat message in > > CSS, it > > only shows as this 'Custom plyra szavazs kezdse a kvetkezokkel' (note > > all of > > the accents have been removed) > > > > So this topic is more about accented characters in UserMessages than > > the IFileSystem problem loading UTF8 files (which still exists, but i > > dont need > > it now) > > > > Thanks > > Olly > > > > On 28/03/07, Tony omega Sergi <[EMAIL PROTECTED]> wrote: > >> > >> -- > >> [ Picked text/plain from multipart/alternative ] > >> He said he's writing a plugin.. > >> > >> > >> On 3/28/07, Mulchman <[EMAIL PROTECTED]> wrote: > >>> > >>> Are you aware of the role of the resource\<mod_name>_<language>.txt > >>> file? > >>> > >>> -----Original Message----- > >>> From: [EMAIL PROTECTED] > >>> [mailto:[EMAIL PROTECTED] On Behalf Of oLLy > >>> Sent: Tuesday, March 27, 2007 17:27 > >>> To: [email protected] > >>> Subject: [hlcoders] IFileSystem loading UTF8 Files > >>> > >>> -- > >>> [ Picked text/plain from multipart/alternative ] > >>> Hello, > >>> I have a keyvalues file with strings for my plugin, and i want to > >>> use this file as a language file so it will have multiple languages > >>> of each string. > >>> > >>> Example > >>> Language { > >>> "EN" { > >>> MsgSettingReload "Reloaded settings." } > >>> "FR" { > >>> MsgSettingReload "Réglages rechargés." } > >>> } > >>> > >>> But when i get the value for 'MsgSettingReload' all of the accents > >>> are left off when creating a usermessage from it. I tried saving > >>> the file with UTF8, and UNICODE encoding; but this time when i > >>> tried to load the file, Visual Studio crashes with this error ( > >>> http://img90.imageshack.us/img90/3373/erroris5.jpg) > >>> > >>> Anyone managed to load a UTF8 encoded file into KeyValues? > >>> > >>> Olly > >>> -- > >>> > >>> _______________________________________________ > >>> To unsubscribe, edit your list preferences, or view the list > >>> archives, please visit: > >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders > >>> > >>> > >>> _______________________________________________ > >>> To unsubscribe, edit your list preferences, or view the list > >>> archives, please visit: > >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders > >>> > >>> > >> > >> > >> -- > >> -omega > >> -- > >> > >> _______________________________________________ > >> To unsubscribe, edit your list preferences, or view the list > >> archives, please visit: > >> http://list.valvesoftware.com/mailman/listinfo/hlcoders > >> > >> > > -- > > > > _______________________________________________ > > To unsubscribe, edit your list preferences, or view the list > > archives, please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

