Thread: Fake returns?
View Single Post
  #5  
Old October 9th, 2008, 11:20 PM posted to microsoft.public.word.formatting.longdocs
WilliamWMeyer
external usenet poster
 
Posts: 12
Default Fake returns?


"Klaus Linke" wrote in message
...
Along these same lines of getting under the hood of what's happening in
the Word file, I'd love to have a better understanding of how to
determine when files contain Unicode versus when they don't, whether
files sometimes *think* they contain Unicode but in fact they don't and
vice versa, etc.


Interesting questions... One quick way to tell if a file has "Unicode
characters" (precisely, characters that aren't in the old Windows code
page 1252) is to try to save as Plain Text (*.txt), choosing the Windows
(Standard) encoding.




I know about this, and do it, but I'd like to able to control these things
without a human being having to look at the file.

I've been able to use VBA to cycle through a file character by character.
Typically for files that use Unicode chars, the chars used are within a
100-200 char unicode range. Once I've identified what that range is, then I
change the values my macro searches for to the values in that range. But
going char by char *and* going unicode value by unicode value through the
whole 6000-char range of unicode values would take a verrry long time.
Already, going char by char through the file takes pretty long.