Author Topic: View spaces in Unicode files & related issues  (Read 4377 times)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
View spaces in Unicode files & related issues
« on: June 25, 2008, 09:25:31 AM »
I understand from help text/etc that SE does not support the View Spaces settings in Unicode buffers.

I have View Spaces and Tabs on in C, C++, Lua, Perl, C#, HTML, Plain Text, and other languages.  I want to see space/tab special characters; turning them off isn't something I'm willing to do.  In v12.0.3 I had it more or less working:  I had to change HTM files to be SBCS instead of Automatic encoding, but all my files (including the Build and Output windows in SlickEdit) successfully showed the space/tab special characters.

Something is different in 13.0.x, though:  the Build and Output windows are showing "?" instead of the 0xB7 character (dot) that I configured.  This is what happened in 12.0.3 when buffers were being treated as Unicode, so I assume there is probably some difference in how encoding is being handled.  Unless my memory is failing me (maybe it is!) in 12.0.3 encoding was set per language, and I thought there was a language that corresponded to the Build and Output windows, and that I had had to change that to use SBCS encoding.  But in 13.0.x the encoding is apparently set on a per-extension basis, not a per-language basis, and I can't figure out which extension controls the Build and Output windows.

1.  Ideally I'd like to see SE render special characters even in Unicode files.  But, I don't understand why a non-Unicode HTML file is being rendered as Unicode.  I could understand if files that really are Unicode have the Unicode limitations, but I'm confused that non-Unicode files are being subject to Unicode limitations for some reason. [Edit: I just discovered that 13.0.x is showing non-Unicode HTML files as non-Unicode -- yay :) that's great, it looks like the encoding stuff got cleaned up and now my issues are only with truly-Unicode(/UTF8/etc) files and with the Build and Output windows].
2.  Alternatively, I'd really like to see a way to at least specify alternate special characters for Unicode buffers (I could maybe accept showing a period instead of the dot as the space special character in Unicode files, but as a general rule I want to see the dot at least in the source files that I edit).  I realize I can specify alternate special characters on a per-language basis, but in most languages files can be SBCS or Unicode, so that doesn't really help.
3.  Failing that, I'd like to know how to get the Build and Output buffers to not be considered Unicode (I'm not entirely sure why they are, though I can sort of see an argument for it since some tools might output Unicode to stdout, but hm).
4.  I think that the Build and Output buffers are probably picking up the View Spaces/Tabs settings from Plain Text, but I haven't verified that.  If so, then it would also be reasonable to have a special language/pseudoextension for them so they could be controlled independently.  And it only helps for the Build and Output windows, it doesn't help for HTML and etc.

I know the simple workaround is to choose ASCII special characters, but seeing dots (for spaces) and chevrons (for tabs) is pretty important to me.  I'll spend hours trying to figure out a way to bend SE to my will, rather than give up my special characters.  :P  Actually I believe I can just write a _cbswitchbuf_ hook to forcibly turn off special characters in any buffer whose name begins with a period, and I may do that as a temporary workaround, but I'd really like to see the special-characters-in-Unicode issue addressed natively in SE.  [Edit: yes, the hook removes the "?" special characters from the Build and Output windows, but it's still not quite what I was hoping for].

Thoughts?  Or am I missing an option that already exists that lets me control this to my liking?  Or other ideas?

Thanks for listening!
C
« Last Edit: June 25, 2008, 10:12:15 AM by chrisant »

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: View spaces in Unicode files & related issues
« Reply #1 on: June 25, 2008, 02:45:04 PM »
We have a Change Request filed to add this feature. If it were easy, it would already be in there. So, I don't think this is the kind of thing that most users will be able to do. We're working on the v14 feature plan right now, so I'll see what I can do...but, I can't make any promises.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: View spaces in Unicode files & related issues
« Reply #2 on: June 25, 2008, 07:10:56 PM »
Thanks, I can sort of understand how #1 would be difficult depending on how the internals of SE's rendering are done.

I'd appreciate a comment on how to work around the fact that #1 doesn't exist.  For example 2 and #3 and #4 shouldn't be hard, and it seems like a simple compromise change in SE could be to add support for #2 -- that's got to be easy since SE can already show ASCII characters for the special characters in Unicode files.

It would be useful to understand how the Build and Output windows pick up their default settings -- that way I could influence them (and that would be useful beyond just not/viewing special characters).

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: View spaces in Unicode files & related issues
« Reply #3 on: June 25, 2008, 09:10:38 PM »
I just noticed that in a Unicode HTML file the View menu commands for Tabs, Spaces, etc are grayed out.
And the help text clearly states that viewing special characters is not supported for Unicode files.

I guess another way to look at that is, if SE doesn't support it then maybe it should just ignore the view special characters settings in Unicode files, rather than attempting to render them but having them show up as "?" all over the place.  I'm not necessarily asking for it to be supported in Unicode -- I'm asking for a way for it to be supported in SBCS files without making Unicode files look hideously unreadable.  :)