Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-21-2018, 07:32 AM
VBorNotVB VBorNotVB is offline Save as txt : How to detect if Unicode encoding is required? Mac OS X Save as txt : How to detect if Unicode encoding is required? Office 2016 for Mac
Novice
 
Join Date: Oct 2018
Location: Southern California
Posts: 25
VBorNotVB is on a distinguished road
Default

Paul,

I created a blank document, added the paragraph "This is a test.", and ran your routine. It reported it as having Unicode characters!

I know my routine is slow, worse yet using wdDialogInsertSymbol makes it even slower!
But I believe it's the only surefire way to catch Unicode characters. Using "(normal text)" as the litmus test forces Word to do the work for us, otherwise special characters like Wingdings can slip through if their character code point falls below 255.

As for testing for ASCII characters 0-127, the first 128 characters of Unicode are ACSII, but represented in long. Thus the use of AscW() which tests for wide characters and guards against reading character code points as negative values!
Reply With Quote
 

Tags
activedocument.saveas, encoding, txt



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro help - converting proprietary encoding to unicode, keep formatting kmawhood Word VBA 3 04-29-2016 04:06 PM
Save as txt : How to detect if Unicode encoding is required? Does 'Save as Unicode text' equal UTF-8 Chayes Excel 1 07-20-2012 03:07 AM
Save as txt : How to detect if Unicode encoding is required? Custom Dictionary & Unicode encoding? markus staubmann Word 3 03-28-2012 05:23 AM
Save as txt : How to detect if Unicode encoding is required? Save Word doc in unicode html (utf-8) rybrns Word 5 09-26-2011 02:18 PM
Save as txt : How to detect if Unicode encoding is required? Unicode Encoding Type Rose44 Excel 2 08-09-2009 09:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft