NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problems with Chinese characters in editor?


Joined: 18 Oct 2010
Posts: 14
Reply with quote
Hello,

running PHPED in Version 14 on Windows 8.1, I tried to edit some utf-8 encoded PHP source file and add this line:

Code:
$lang[1009]["CNS"]= "德语[DE];英语[EN];法语[FR];中文[CNS]";


But sadly, the cursor is doing strange in this line and I can not really edit this line reliable. Other editors like Notepad++ or PSPad having no problems. Is there something I can do to make this work? Is this fixed in newer versions? Really?
View user's profileFind all posts by KukulkanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
it is FAQ
http://www.nusphere.com/kb/technicalfaq/faq_wrk_with_phped.htm

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Oct 2010
Posts: 14
Reply with quote
Oh Embarassed Thanks, I will have a look and try this.
View user's profileFind all posts by KukulkanSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
The reason why we do not set that by default is performance. It's significantly higher if font is mono-spaced. Unfortunately, Chinese, Japanese and some other characters won't fit into font's "regular" cell and even mono-spaced fonts provide them with wider cells. That's why you need to turn mono-space checkbox off. Otherwise all these over-sized cells will be painted wrong.
BTW I tried to make that checkbox off if installed on windows with Chinese, Japanese etc locale, but I never had a chance to check. If you want, we can make this working out of box with your help.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Oct 2010
Posts: 14
Reply with quote
Hello Dmitri,

I just found that the checkbox works well even if the character set stays at "default". Interestingly, best results I have with Charset ANSI and font "Courier New". Not sure why, but hey...

I think I'm not a good candidate for such test as I do not have a clue about such languages and encoding. But why don't you simply check the loaded source codes for characters above U+0400 (*) and then point the user to uncheck the monospace fonts checkbox? Or better directly ask to do so in a short explaining dialogue (you can copy your answer above). This would have helped me very much and users who do not deal with such languages are not affected at all.

(*) = I took a quick look at the unicode table and found that Cyrillic seem to be the first one with characters having special width. May need further investigation.
https://en.wikipedia.org/wiki/List_of_Unicode_characters#Cyrillic
View user's profileFind all posts by KukulkanSend private message
Problems with Chinese characters in editor?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic