View Single Post
  #5 (permalink)  
Old 06-15-2009, 07:10 PM
Randem
Newsgroup Contributor
 
Posts: n/a
Re: Is there a way to open a unicode file in Notepad with the correct script

Sorry, it was basically a yes or no question. I just wanted to know if there
was a parameter you could supply that would tell Notepad what font script to
use with a partitcular file...

--
Randem Systems
Your Installation Specialist
The Top Inno Setup Script Generator
http://www.randem.com/innoscript.html
Disk Read Error Press Ctl+Alt+Del to Restart
http://www.randem.com/discus/message...tml?1236319938



"Andrew McLaren" <me@somewhere.org> wrote in message
news:%23Eo5MnW7JHA.5828@TK2MSFTNGP04.phx.gbl...
> Randem wrote:
>> That I already knew... but the question remains...

>
> If "the question remains" then you probably haven't described your
> question precisely enough. I'm not going to keep lobbing bits of
> information at you, trying to guess what you already know, and what you
> don't know.
>
> But, for the record ...
>
> To reduce it to a single API, Notepad on XP uses the Win32 IstextUnicode()
> API. As a professional developer, you'll be aware that this API has a
> reputation for being a bit hit-and-miss. This has been discussed
> extensively in Microsoft developer Blogs for several years; such as:
>
> "Some files come up strange in Notepad"
> http://blogs.msdn.com/oldnewthing/ar.../24/95235.aspx
>
> "The Notepad file encoding problem, redux"
> http://blogs.msdn.com/oldnewthing/ar...7/2158334.aspx
>
> and
>
> "Why I don't like the IsTextUnicode API"
> http://blogs.msdn.com/michkap/archiv...30/363308.aspx
>
> "The Notepad encoding detection issues keep coming up"
> http://blogs.msdn.com/michkap/archiv...2/2239345.aspx
>
>
> You can read all about IstextUnicode() here:
> http://msdn.microsoft.com/en-us/libr...72(VS.85).aspx
>
> In Vista SP1 and later, Notepad uses it's own algorithms which are a bit
> smarter than IstextUnicode(), to try to detect whether text is Unicode or
> not. This reduces the frequency of mis-judgements, but it there is still
> an element of chance and guessing.
>
> If your question revolves around the interactive use of Notepad as an
> end-user, then to open a file as Unicode is easy. Go to File menu, Open,
> and select teh appropriate encoding from the drop down list in the File
> Open dialogue: ANSI, Unicode, Unicode Big Endian, or UTF-8. Then select
> the file you want to open. Again, CJK chars will only display correctly if
> Notepad is using a font which contains the necessary CJK glyphs.
>
> If this does not answer your question then please explain IN DETAIL what
> you are trying to do, what the configuration is (eg what langugae Windows
> are you using; do you have configured in Regional Settings etc) and what
> results you are getting; preferably so we can reproduce and debug the
> problem here.
>
> Thanks
>
> Andrew
> --
> amclar at optusnet dot com dot au



Reply With Quote

 
Old 06-15-2009, 07:10 PM