How do you display TM and Copyright characters?

Posted by jquerijero on 17-Jun-2009 11:38

They display as square blocks.

All Replies

Posted by Thomas Mercer-Hursh on 17-Jun-2009 11:49

Pick a font that has them.

Posted by jquerijero on 17-Jun-2009 13:55

Hmm, TM doesn't normally show as part of the list, but is supported by the MS San Serif. It does allow you to paste it at design-time and shows correctly during run-time. However, it doesn't translate when TM character is pasted or used CHR(153) directly in the code.

Posted by Thomas Mercer-Hursh on 17-Jun-2009 14:03

This is entirely a code page issue.  If you take a code page on the display which contains the character and post it into a session with a different code page or store it in a database with a different code page, what is stored is the ASCII value, not the font.  So, when you display it, you get the character in the current code page and font.  To get consistent displays you need to pick code pages and fonts with consistent character mappings.

Posted by jquerijero on 17-Jun-2009 14:36

Do you mean the run-time and design-time don't share the same codepage? If that is the case, how do you make them the same?

Even the ones pasted on the designer doesn't display correctly during run-time.

Posted by Thomas Mercer-Hursh on 17-Jun-2009 15:15

Check your startup parameters ... there are half a dozen settings available for UI, stream, internal, database, etc.  They don't necessarily have to all be the same, but they must be compatible.  Your starting place, unless these are strictly UI decorations, is to get the database right.  Then the rest either has to match or has to be something that will map into the database, usually by having the database be Unicode of some flavor.  Also, you will want to pay attention to your .ini file or its registry equivalent for the fonts that are specified in order to make sure they support the code page and characters you want.  It is a bit fussy to sort out, but very powerful.

Posted by jquerijero on 06-Jul-2009 10:12

What is the codepage used by the designer?

Posted by Peter Judge on 06-Jul-2009 10:18

jquerijero wrote:

What is the codepage used by the designer?

Since the designer simply writes out (OO) ABL, it'll use whatever Eclipse uses. You can check the individual file (File -> Properties) (and also change it) and there's a setting in the General/Workspaces page that lets you set the codepage for all new files, IIRC.

-- peter

Posted by jquerijero on 06-Jul-2009 10:22

OK, I'm re-phrasing my question, what Progress run-time codepage that is closest to the designer's setting?

Posted by Thomas Mercer-Hursh on 06-Jul-2009 11:25

The closest one will be the same one.  You just need to find out what that is.

Note that there is a possible twist here in that many code pages cover just a single ASCII character while others use more than one, notably Asian double byte codepages and the various flavors of Unicode. ™ and © are included in some single byte code pages and in the Unicode code pages ... but I don't recall whether they are single byte in the Unicode codes pages ... I think not.  So, you need to get all this stuff working together.  Look up the various -cp* parameters, check the code page for the database and if you pick a code page for all of that which includes the symbols, you should be OK, although getting that same page in VD might be another issue.

Posted by GregHiggins on 09-Jul-2009 10:15

Go to Window -> Preferences + General -> Workspace and view the Text File encoding.

You can change it, mine says cp1252 (Windows, generally the accepted replacement for iso-8859-1).

http://en.wikipedia.org/wiki/Windows-1252

Since OpenEdge Architect only works on Windows, odds are that your Architect is using the Windows standard code page for your culture.

Posted by jquerijero on 10-Jul-2009 11:51

I did a re-install of OE and picked 1252 Basic Basic instead of the default ISO codepage. It could be that Progress just have to change default codepage, at least for installation that includes Architect.

Posted by jquerijero on 10-Jul-2009 17:32

Looks like you will have to select the correct codepage (1252 Basic Basic) when you run the OE installation. The Progress default is ISO-8859-1 Basic Basic, but the OE IDE is 1252.  This way the run-time and the design-time codepages are compatible on the get go.

Posted by Admin on 11-Jul-2009 06:29

Default code-pages are in %DLC%\startup.pf, no need to reinstall to change them.

Just change them in that file. Or override them for a specific session (like the AVM session in an OEA project or launch config).

This thread is closed