Login Register Actian.com  

Actian Community Forum


Go Back   Actian Community Forums > Development Tools > Application Development using OpenROAD
 

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 2007-11-21   #1 (permalink)
Junior Member
 
Join Date: Nov 2007
Posts: 2
Default MSWord unprintable characters and how to remove them

Hello,

We have an application and part of it has a large text field for users to enter text. A lot of the time users copy text from a MS word document and paste it into this field.

The trouble is that the older version of word uses unprintable characters that appear as Bold Pipe symbols when displayed. Some of these characters are hyphens, quotes, tabs etc.

When commited to the database they appear as

Hyphen \226\nhorizontal ellipsis \205\nSingle quotes \221quote\222\nDouble quote \223quote\224\nTab\t\nNewline\n

When the user tries to print this text it fails. We currently have a awk script that can strip out these \226 etc characters.

What we'd like to do is to remove them in Openroad before they're commited. The trouble is that when you examine the string in debug, before it's commited, all of these character just appear as blank space.

Does anyone have any idea how we can remove and replace them with the correct symbols?


Thanks

Andy
mcbain1212 is offline   Reply With Quote
Old 2007-11-23   #2 (permalink)
Actian Corp
 
Bodo's Avatar
 
Join Date: Mar 2007
Location: On the OpenROAD
Posts: 2,250
Default

This sounds to me like your word documents are using characters with character codes > 127 (0x7F) (extended 8-bit characters).
The \226 numbers are octal numbers, so \221 (0x91) for instance is not a quote (apostrophe), but a left single quote - but this is depending on the font you are using. So, it's left single quote in "Arial" or "Times New Roman", but it's just a bold pipe symbol in "System" font, where all characters from 0x7F to 0x90 and 0x93 to 0x9F are displayed as the same bold pipe.

So, the first thing to check is the font setting/mapping for your multiline EntryField.

If you store the data in the database and print them,
you of course have to print them using a program that supports the extended characters using an according font / character set.
Bodo is offline   Reply With Quote
Old 2007-11-27   #3 (permalink)
Junior Member
 
Join Date: Nov 2007
Posts: 2
Default

thanks for the info.

I managed to find a way to check each character and swap out non printable ones.
mcbain1212 is offline   Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2011 Actian Corporation. All Rights Reserved