Color Embedding bug?
#1

Hi all i'm from Thailand. I have one question about color embedding for non-English language(i'm use Thai text).

when I'm use Thai text in dailog,sendClientMessage or other and I embedding some color in string the color is go wrong position same example pic








i'm test many thai word and i think this problem happen from Thai vowel ex : ่ ่ ๊ ๋ when i use Thai vowel color is go wrong position but if i not use vowel color show normally



when use vowel
Code:
SendClientMessage(pid,-1,"{FF0000}[ป่าป๊า] {FFFFFF}ข้อความ Text blah blah blah ");


and not use
Code:
SendClientMessage(pid,-1,"{FF0000}[ปาปา] {FFFFFF}ข้อความ Text blah blah blah ");


how to fix it

ps. sorry for my bad english
Reply
#2

Quote:
Originally Posted by Y_Less
View Post
IIRC this is to do with unicode combining marks, which are separate characters but merge in to other characters. So you appear to write 5 characters, but it is stored as 7, 2 of which are modifiers for other characters. The problem is that then the colour see that it comes after 7 characters, and so appears after 7 characters without accounting for the fact that now 2 have vanished.

The work-around is to work out how many non-printing characters you have, and move your colour back that many places.

Edit: I should note that this is just a theory, though if I'm right then a programatic fix should be possible. I may look in to one for fixes.inc (probably disabled by default though as I suspect it will be quite intensive.
i test many thai word and it longer than 7 character. If I'm use normal thai character(not include thai vowel"่ ่ ้ ๊ ๋") the color is show position normally but when I include thai vowel "่ ่ ้ ๊ ๋" in my text the color gone wrong position. I think Thai vowel is problem for this topic but i'don't know why it's happen.

ps. very well if u can fix and add to fixes.inc i'm using this include in my server,that is very usefull inc for fix common problem in my server Thanks
Reply
#3

Quote:
Originally Posted by Y_Less
View Post
The 7 was just an example.
i try to longer than 7 it's not wrong if i don't use thai vowel



Reply
#4

Quote:
Originally Posted by Y_Less
View Post
I don't know Thai, but from your first examples, it looks like the vowels modify the previous letters, i.e. are attached to them, which is what I described.
yes some thai vowel is attached in thai character

i think you cannot see my thai vowel in my comment. i do this pic for other can see thai vowel




some vowel if not attached in character this problem not happen

but some vowel attached in character this problem happen

Reply
#5

Quote:
Originally Posted by Y_Less
View Post
The issue is still sounds like what I wrote in my first post.
sorry my reading skill in english language is little

Thk for advice. In this time this bug cannot fix allright?
Reply
#6

This can help you. https://forum.sa-mp.com/showthread.p...88#post4056488

พอดีผมลองทดสอบแล้วมันได้ผลในระดับนึง แต่ถ้าเป็นข้อความยาวๆที่มี \n\t และมี Embled ติดๆกันมันแสดงผลไม่ตรง ซึ่งถ้าผมเข้าใจ Logic ปัญหานี้ ผมคิดว่าอนาคตอยากจะทำให้มันสมบูรณ์ได้
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)