Hello.
My question is how can i use UTF-8 in
SendSysMessage or Gumps...
i need charset ź ę ł ó ą ż ...
SendSysMessage, Print and other methods... how charset...
Re: SendSysMessage, Print and other methods... how charset..
I am not familiar with UTF-8 but is that the same as Unicode? I think you would use the unicode.em module for SendSysMessage etc. but I don't know about gumps. Here is the link to the docs section that lists the functions in that module. I apologize if I am incorrect but as I said I am not familiar with UTF-8 or Unicode I/O.
Re: SendSysMessage, Print and other methods... how charset..
Yes i know... exist module but dont work...
Re: SendSysMessage, Print and other methods... how charset..
This ucod include is for Russian unicode, but you can change it to letters you need, and change langcode to your's:
langcode := "RUS"
In UO.EM comment these lines:
//Broadcast( text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
//PrintTextAbove( above_object, text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR, journal_print := JOURNAL_PRINT_NAME );
//SendSysMessage( character, text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
Don't know if it'll work with basic.em::Print()
I don't see russian letters correctly in a console window. But I never tried to do anything with it.
In scripts you have to add:
use unicode;
include "include/ucod";
and usage will be simple like:
SendSysMessage(who,"Добавлено "+ochk+" очков",3,COLOR_GREEN);
***********
As for the gumps text entries and text input, you'll need to use packethook.
You'll need to change this function:
Russian letters in UO's fonts.mul start from 176 (1024-848=176).
We changed fonts.mul letter's in some basic fonts, check it with UOFiddler.
And in your client's uo.cfg add:
UnicodeSpeech=on
Hope it'll help you.
langcode := "RUS"
In UO.EM comment these lines:
//Broadcast( text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
//PrintTextAbove( above_object, text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR, journal_print := JOURNAL_PRINT_NAME );
//SendSysMessage( character, text, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR );
Don't know if it'll work with basic.em::Print()
I don't see russian letters correctly in a console window. But I never tried to do anything with it.
In scripts you have to add:
use unicode;
include "include/ucod";
and usage will be simple like:
SendSysMessage(who,"Добавлено "+ochk+" очков",3,COLOR_GREEN);
***********
As for the gumps text entries and text input, you'll need to use packethook.
You'll need to change this function:
Code: Select all
function UnicodeParser(byref uniarr)
var i;
for(i := 1; i<=uniarr.size();i+=1)
if(uniarr[i] > 1024)
uniarr[i]-=848;
endif
endfor
endfunction
We changed fonts.mul letter's in some basic fonts, check it with UOFiddler.
And in your client's uo.cfg add:
UnicodeSpeech=on
Hope it'll help you.
- Attachments
-
fonts.rar- Russian fonts.mul
- (51.47 KiB) Downloaded 351 times
-
TextEntry.rar- Russian unicode packethook
- (2.12 KiB) Downloaded 364 times
-
ucod.rar- Russian unicode functions
- (5.79 KiB) Downloaded 348 times