How to insert Macron eg Ā letter with line above in a field. XPA 3.3


Graham White
 

Hi all,

 

Is there a way to have a field in which characters with a macron (line above letter) in it?  If there is will PSQL handle it ok?  How would it sort them?

 

Regards

 

Graham White
Software Developer
Graham.White@...
EC Credit Control |  eccreditcontrol.com

 

IMPORTANT NOTICE: This e-mail message and any attachments are confidential to EC Credit Control and subject to legal privilege (which is not waived or 

lost by mistaken delivery). If you have received this e-mail in error, please advise the sender immediately and destroy the message and any attachments.  

If you are not the intended recipient you are notified that any use, distribution, amendment, copying or any action taken or omitted to be taken in reliance of 

this message or attachments is prohibited. EC Credit Control collects personal information to provide and market our services (see our privacy policy at: 

www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use, disclosure and access). 

EC Credit Control’s liability in connection with transmitting, unauthorised access to, or viruses in this message and its attachments is limited to resupply of 

any affected message or attachments.


Steven Blank
 

Graham,

There are two separate aspects to your topic: (1) are you talking about one-byte (ANSI) or two-byte (Unicode) characters, and (2) are you talking about ISAM Pervasive or ODBC Pervasive?

Assuming you're talking about one-byte characters, any old Alpha field is able to store, retrieve, display, etc such extended characters.

Regarding sort sequence, by default, Pervasive collates characters in STRING indexes by ASCII value.  Thus, if your special character has an ASCII value of, say, 217, Pervasive will collate this character AFTER the special character whose ASCII value is 216, but BEFORE that special character whose ASCII value is 218.

However, if you implement a custom Alternate Collating Sequence, then Pervasive (and Magic, too, for that matter) will collate such special characters according to that ACS instead. In other words, by implementing a proper ACS, Pervasive could collate these special characters equally with their non-augmented counterparts, if that's what you're after. For example, Pervasive could be tricked into collating all of the following characters equally:

A, À, Á, Â, Ã, Ä, Å

Sans a custom ACS, the above characters would be collated simply by their ASCII values, which would separate "A" from the rest of the list by a great number of characters.

HTH.

Steven G. Blank
SGBlank Consulting



On 8/5/2021 6:14 PM, Graham White wrote:

Hi all,

 

Is there a way to have a field in which characters with a macron (line above letter) in it?  If there is will PSQL handle it ok?  How would it sort them?

 

Regards

 

Graham White
Software Developer
Graham.White@...
EC Credit Control |  eccreditcontrol.com

 

IMPORTANT NOTICE: This e-mail message and any attachments are confidential to EC Credit Control and subject to legal privilege (which is not waived or 

lost by mistaken delivery). If you have received this e-mail in error, please advise the sender immediately and destroy the message and any attachments.  

If you are not the intended recipient you are notified that any use, distribution, amendment, copying or any action taken or omitted to be taken in reliance of 

this message or attachments is prohibited. EC Credit Control collects personal information to provide and market our services (see our privacy policy at: 

www.eccreditcontrol.co.nz – www.eccreditcontrol.com - www.eccreditcontrol.com.au for more information about use, disclosure and access). 

EC Credit Control’s liability in connection with transmitting, unauthorised access to, or viruses in this message and its attachments is limited to resupply of 

any affected message or attachments.



Graham White
 

Hi Steve,

Thanks for your reply.  When I do a test in a ascii convertor for ā to ascii I get a 196 129.  If I do ASCIIVal('ā') in Magic I get 97 which is a (no macron). I guess this means it is not ANSI but Unicode, correct?  Does this mean the only way I can store it in Magic is in a Blob?  

These characters are from the New Zealand Maori alphabet.

Regards
Graham


Steven Blank
 

Graham,

Pervasive has supported Unicode data for quite a while now – in the PVSW world, this datatype is known as WString.

I just did some poking around in Magic xpa v3.3g and find that the Magic Btrieve (ISAM) gateway in v3.3g provides apparently-full support for Unicode columns as well as for indexes on those columns, so you should be good to go.

Columns in which you want to store Unicode data should be defined in the Data Sources Repository as Attribute:Unicode, Stored As: WString. As I mentioned, Unicode columns may also be included in indexes. FYI, internally, Unicode characters consist of two bytes each, so a ten-character Unicode column will consume 20 bytes in the fixed-length portion of the record.

I don't know how Pervasive collates WString index segments, so you may yet still need to implement an Alternate Collating Sequence in order to fully implement Maori as you desire.

The other unknown – applicable to ANY backend database – is how to actually TYPE these characters in a Unicode Edit Control, a problem here left as an exercise for the student. ;)

HTH.

Steven G. Blank
SGBlank Consulting


On 8/8/2021 2:39 PM, Graham White wrote:
Hi Steve,

Thanks for your reply.  When I do a test in a ascii convertor for ā to ascii I get a 196 129.  If I do ASCIIVal('ā') in Magic I get 97 which is a (no macron). I guess this means it is not ANSI but Unicode, correct?  Does this mean the only way I can store it in Magic is in a Blob?  

These characters are from the New Zealand Maori alphabet.

Regards
Graham


Graham White
 

Thanks Steve for your answer.  I will have a play around and see how I get on.  We have just been asked by one of our bigger clients if we can handle these fields but no timeframe until we are expected to.  We will intially get these from an xml file supplied by the client and if we need to maintain them in our system we will need to install the Maori keyboard on the users who will be editing the relative forms.

Regards
Graham White


Graham White
 

Hi Steve,

I have finally got some sample data from our clients and i am testing storing the fields with characters with macrons.  In your email you said to "define in Data Sources Repository as Attribute:Unicode, Stored As: WString" however when i do that I don't get an option for Wstring (see below) am I missing something?

Regards
Graham




Steven Blank
 

Graham,

Sorry, "WString" is the name of the corresponding Btrieve datatype. In a Magic-Pervasive ISAM database, this storage type is known as Unicode.

Steven G. Blank
SGBlank Consulting


On 11/11/2021 12:08 PM, Graham White wrote:
Hi Steve,

I have finally got some sample data from our clients and i am testing storing the fields with characters with macrons.  In your email you said to "define in Data Sources Repository as Attribute:Unicode, Stored As: WString" however when i do that I don't get an option for Wstring (see below) am I missing something?

Regards
Graham