mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
change in topmenu and some fixes
This commit is contained in:
@@ -29,6 +29,7 @@ char Fw::utf8CharToLatin1(uchar *utf8, int *read)
|
||||
{
|
||||
char c = '?';
|
||||
uchar opt1 = utf8[0];
|
||||
*read = 1;
|
||||
if(opt1 == 0xc3) {
|
||||
*read = 2;
|
||||
uchar opt2 = utf8[1];
|
||||
@@ -39,7 +40,6 @@ char Fw::utf8CharToLatin1(uchar *utf8, int *read)
|
||||
if(opt2 > 0xa1 && opt2 < 0xbb)
|
||||
c = opt2;
|
||||
} else if(opt1 < 0xc2) {
|
||||
*read = 1;
|
||||
c = opt1;
|
||||
}
|
||||
return c;
|
||||
@@ -49,7 +49,7 @@ std::string Fw::utf8StringToLatin1(uchar *utf8) {
|
||||
std::string out;
|
||||
int len = strlen((char*)utf8);
|
||||
for(int i=0; i<len;) {
|
||||
int read;
|
||||
int read = 0;
|
||||
uchar *utf8char = &utf8[i];
|
||||
out += Fw::utf8CharToLatin1(utf8char, &read);
|
||||
i += read;
|
||||
|
Reference in New Issue
Block a user