UTF8 characters support


Nicu101268
 Share

Recommended Posts

It seems to be a bit of a mystery exactly what is supported and how.  I have had some success with copying and pasting emoji's and such but for font characters you seem to be able to open your windows "Character Map" and copy and paste from there.

 

Was there something specific you were after that we could test ?

Link to comment
Share on other sites

Is there anything official on the topic Dermot ?   I was wondering what was supported and what is not ?  And yes in X12 or 13.

 

Ruby 2.4.0 claims to fully support UTF8 but there seem to be certain ranges that are not accessible.

 

image.thumb.png.0d92fd11ca0213f01ee290001edd025d.png

 

 

Link to comment
Share on other sites

16 minutes ago, Nicu101268 said:

Well, I used Rich Text for my purpose, but it's weird that the characters are recognized here, and they're not in the Room Label.
However, it is a compromise solution...

 

Back in X9 Chief implemented Unicode in Rich Text but not in standard text or in various data entry fields.  I believe it was X12 where Chief added Unicode support for standard text boxes as well. 

Link to comment
Share on other sites

32 minutes ago, Chopsaw said:

Ruby 2.4.0 claims to fully support UTF8 but there seem to be certain ranges that are not accessible.

Don't forget that Ruby support and Chief text box support are 2 entirely different things.  Ruby might pass the information on to Chief but if Chief doesn't support it then you'll get the question marks.  This was the case back in X9 where Ruby supported Unicode but Chief's standard text boxes did not.  Having said that, I have yet to find a character range that does not work in both standard Text and Rich Text in X12 (at least for what I've used it for).

Link to comment
Share on other sites

IOW: upgrade to X12 and it should work OK.

 

However, there is still a problem. Not all Fonts (Most Not) support all code points.It appears that If the font you are using does not support the UTF-8 code point that Chief will default to its Chief Blueprint font which is close to Arial in code point support. If not.it should, in that case return either a space or question marl, but instead, it does default to another font  which can be confusing..  At any rate, in X12, you can cut/paste or use the alt keys or use Ruby -- all should work fine except for the missing code point thing which might get you a font character appearance that you do not want.

 

I talked to TS and he guessed that Chief Blueprint was defaulted to, but wasn't sure and said he could not tell me if he knew. Perhaps Dermot has the authority to tell us how X12 functions??

 

Bottom line: its not going to work in X9 but should work OK in X12 -- Great improvement and worth the upgrade. It appears to work there uniformly across all fields and macros..Note: that if you are using a foreign language you are better off using that language keyboard, otherwise you will have to input upper level code points individually which is impractical.

Link to comment
Share on other sites

I am not so sure that UTF8 in ruby is dependent on what font is default in Chief.  I have Arial and Chief Blueprint set as defaults and was doing some testing with the CO Control Codepoints (U+0000 - U+001F) and they all worked even though they are not all supported by Arial or Chief Blueprint.  Possibly I had a font installed in windows that did that I was not aware of and it was being referenced.  So I installed Unifont that seems to have pretty extensive support but still could not access any of the C1 Control Codepoints ( U+0080 - U+009F ) that I wanted to use.

 

Maybe cut and paste functions differently since I have used some pretty funky emoji that I don't think exist anywhere else on my system.  It would just be great to know what we should be able to expect to function and what does not.

Link to comment
Share on other sites

Just checked --

Text boxes use the font selected. If the macro uses a code point out side of the font set, it returns a blank as expected. Labels use the chief blueprint font which about the same as Arial.

It would nice if we could get the definitive answer from Chief instead of guessing? There is noway, AFAIK, for macros to select a font set or size, they only pass through code points.or encoded text.

 

Still hoping that the MM will let us select font size?

 

EDIT:

It appears that the MM only uses Arial but will pass through the correct code point. This will be a problem if one is copy/paste from another font ifrom another language -- Should be fixed. as what font  one is coding as it may look different then what is displayed.in MM

Link to comment
Share on other sites

2 hours ago, Chopsaw said:

 

I don't think I have that one...     Arial, Arial Black, and Arial Narrow.

 

 

According to: https://en.wikipedia.org/wiki/Unicode_font

 

Arial Unicode MS  does not carry C0 or C1 Control Characters.

 


Ah, I missed that you were talking about some non-printing control characters.  I won’t pretend to understand exactly how those work but I don’t believe they even need or always have associated characters.  I mean just because there’s a code point doesn’t mean it has an accompanying character.  That means the font may or may not even matter (?)  Also, I’m not sure which characters you’re trying to call or how you’re trying to use it, but have you tried simply using the ASCII range?  Most of the ones we might use are included in that range as well.  Also, if you’re trying to use them in Ruby, there are some built in backslash notations that might help...

 

Backslash notation Hexadecimal character Description
\a 0x07 Bell or alert
\b 0x08 Backspace
\cx   Control-x
\C-x   Control-x
\e 0x1b Escape
\f 0x0c Formfeed
\M-\C-x   Meta-Control-x
\n 0x0a Newline
\nnn   Octal notation, where n is in the range 0.7
\r 0x0d Carriage return
\s 0x20 Space
\t 0x09 Tab
\v 0x0b Vertical tab
\x   Character x
\xnn   Hexadecimal notation, where n is in the range 0.9, a.f, or A.F
Link to comment
Share on other sites

Yes that all makes sense or at least leaves me with all the same questions.  Tried all the formatting methods I could look up including ASCII.  All of the C0 and C1 Control Characters have Ruby values, the common ones with the "\" as you posted and all the rest use \u{xx} formatting.

 

Just as an example U+000A  or  \n  is quite commonly use in Chief ruby macro's but to my knowledge does not exist in Arial or Chief Blueprint, or even Arial Unicode MS.  So what makes it work as it seems to flawlessly ?

Link to comment
Share on other sites

It certainly is a part of Arial, etc.. which,if you do a web search of Arial code points, you'll see it listed. It does not show up in character maps because it is a non-printable control character. (Control set #1). Character maps usually only show printable characters.BTW: just because Ruby supports control set #2 doesn't mean Windows does.By definition control set #2 is optional depending on the software.

Link to comment
Share on other sites

59 minutes ago, Chopsaw said:

Yes that all makes sense or at least leaves me with all the same questions.  Tried all the formatting methods I could look up including ASCII.  All of the C0 and C1 Control Characters have Ruby values, the common ones with the "\" as you posted and all the rest use \u{xx} formatting.


Can you possibly expand more specifically on which characters you’re attempting to access or more specifically what you’re trying to accomplish?  

Link to comment
Share on other sites

7 minutes ago, Alaskan_Son said:

Can you possibly expand more specifically on which characters you’re attempting to access or more specifically what you’re trying to accomplish?  

 

The objective was to have a 1 1/2 line space separation in a ruby generated object label.  It seemed that looking up the UTF8 Control Codepoints that it would be simple to combine \n with U+008B to get 1 1/2 spaces but apparently not ?

Link to comment
Share on other sites

15 minutes ago, Chopsaw said:

 

The objective was to have a 1 1/2 line space separation in a ruby generated object label.  It seemed that looking up the UTF8 Control Codepoints that it would be simple to combine \n with U+008B to get 1 1/2 spaces but apparently not ?


Copy and paste this and see if it does what you’re looking for...

”  “

Link to comment
Share on other sites

Not quite sure how the formatting should be but I get a different error pasting that in.

 

Evaluation Error: Ruby SyntaxError: (eval):100: invalid Unicode escape

="\n" + "\u{  }"

 

Rather than

Evaluation Error: Ruby Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT

="\n" + "\u{8B}"

 

If I put it straight in like this ="\n" + "  "  there is no error but then no change in the result either.

 

This works fine but gives two lines  ="\n" + "\u{0A}"

Link to comment
Share on other sites

18 minutes ago, Chopsaw said:

Not quite sure how the formatting should be but I get a different error pasting that in.

 

Evaluation Error: Ruby SyntaxError: (eval):100: invalid Unicode escape

="\n" + "\u{  }"

 

Rather than

Evaluation Error: Ruby Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT

="\n" + "\u{8B}"

 

If I put it straight in like this ="\n" + "  "  there is no error but then no change in the result either.

 

This works fine but gives two lines  ="\n" + "\u{0A}"

 

Sorry Chop, I posted that from my phone and the quotations didn't translate right.  Use this instead...

"  "

Link to comment
Share on other sites

2 minutes ago, Alaskan_Son said:

Sorry Chop, I posted that from my phone and the quotations weren't right.  Use this instead...

 

I replaced your funny quotes on one of my previous attempts.   Any suggestions on how to work it into my coding ?

Link to comment
Share on other sites

Sorry, I think I misunderstood what you were after.  I thought you wanted 1-1/2 spaces between characters.  I see now that you must be after 1-1/2 newlines.  Sorry, but I don't think Chief supports that functionality.  In fact, I've never actually seen it put into use anywhere. 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share