NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Tab inconsistency when using double-byte chars.


Joined: 30 Aug 2010
Posts: 8
Reply with quote
This is the problem:
http://tinypic.com/view.php?pic=1pil5d&s=7

I don't have this problem in other -non-Japanese- text/code editors. Tabs are aligned fine even if I mix double and single byte characters.
PhpED is far superior to those editors, so can I expect a fix in *near* future versions? Very Happy Very Happy
View user's profileFind all posts by BurakUedaSend private message


Joined: 30 Aug 2010
Posts: 8
Reply with quote
Bumping this after almost a year.
v7.0 and this problem still persists.

Perfectly aligned tabs are very important for a developer.
Considering this is a commercial product, not having this simple bug not fixed for almost a year is pretty disappointing.

Even the most simple FREE! editors can do this (jEdit, Notepad++ etc.).
View user's profileFind all posts by BurakUedaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
btw it's a question explained in the FAQ
http://www.nusphere.com/kb/technicalfaq/tip_chinese_characters.htm
1) uncheck Monospaced fonts checkbox
2) select appropriate Character set for the font
3) select font that contains double-width characters

results depends on the font you selected. If the characters are represented with exactly the same width, the tabs will be aligned at the same width.

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


Joined: 30 Aug 2010
Posts: 8
Reply with quote
In Windows, Monospace, Courier New, Droid Sans Mono, Bitstream Vera Sans Mono all of them are mono spaced fonts and all of them support double-width Japanese characters.
But when I select both SHIFTJIS and monospace I cannot see anything in the font list.

But that is not the point. Why do you need to check my coding font for tabs anyway? There is no English tab, Chinese tab or Russian tab. Tab is a tab everywhere.
Why don't you use default system mono-spaced font for the tab character, regardless what I choose for coding?

Edit:
Re-read you post. You said "un-check", sorry.
I unchecked the monospaced and I had the font list.
But the result are the same.

Typically, all full-width Japanese characters has same width, as well as all the ASCII characters (Droid Sans Mono). However, Japanese characters and ASCII characters are not same width, obviously.
View user's profileFind all posts by BurakUedaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
Typically or not, they more than often are not monospaced. Anyway, with that option checked, you get some (little) performance improvement but if the font is not truly monospaced, the characters will overlap and cause some other inaccurate effects. With dbl-width fonts it's always safer to turn the option off.
Regarding "tab" characters -- it depends. Some document processors like MS Word allow you to specify visual positions the tabs will align to. In other editors like PhpED it works differently. TAB just moves caret using some fixed alignment. For the sake of simplicity assume you specified in the settings that TAB should be aligned to 4 spaces. In this case entering tab at 1st postion will move caret to the right by 4 spaces (effectively). If the caret was at say 3rd position, caret will move by only two spaces, and so forth -- the target position will be the same until you move caret to the 5th position. In this case caret will move by four spaces again introducing next alignment position. It works fine if the font is not monospaced. But it won't align to fixed visual position if it's not. It works this way for the performance reasons and this is a common practice in all code editors I know.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Tab inconsistency when using double-byte chars.
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