If it's for internal use, I'd set up my own function (or subroutine)
with the one - to - one relationships between each lower case accented
letter and it's upper case equivalent. If the idea is to send info to a
third party, or to use in a different database within you company, be
careful that: a) not all third parties are able to recieve accented
characters, b) It is completely acceptable and frequenty used in spanish
speaking countries to strip accents off upper-case letters. If is quite
common to see JOSE rather than JOSÉ, c) Make sure that the ascii
equivalents in UV for the accented letters coincide with what your third
party recieves. Perhaps you send char(xxx) as a Á, but the recieving
party expects char(yyy).
Regards,
Marc
On Mon, 25 Nov 2013 14:36:48 -0600, George Gallen wrote:
> Any consideration of converting the accented character to an
> unaccented character first?
>
> Not perfect but it works 99% of the time....and then when you export
> the name to another company
> All they get are unaccented letters.
>
> George
>
>
> SUBROUTINE REMOVE.ACCENT(INDATA,OUTDATA)
> *
> UAE=CHAR(140):CHAR(198)
> LAE=CHAR(156):CHAR(230)
> DEGREE=CHAR(176)
> *
>
>
> NULL1=CHAR(128):CHAR(129):CHAR(130):CHAR(131):CHAR(132):CHAR(133):CHAR(134):CHAR(135):CHAR(136):CHAR(137)
>
>
> NULL2=CHAR(139):CHAR(141):CHAR(143):CHAR(144):CHAR(145):CHAR(146):CHAR(147):CHAR(148):CHAR(149):CHAR(150)
>
>
> NULL3=CHAR(151):CHAR(152):CHAR(153):CHAR(155):CHAR(157):CHAR(160):CHAR(161):CHAR(162):CHAR(163):CHAR(164)
>
>
> NULL4=CHAR(165):CHAR(166):CHAR(167):CHAR(168):CHAR(169):CHAR(171):CHAR(172):CHAR(173):CHAR(174):CHAR(175)
>
>
> NULL5=CHAR(177):CHAR(178):CHAR(179):CHAR(180):CHAR(181):CHAR(182):CHAR(183):CHAR(184):CHAR(185):CHAR(187)
> NULL6=CHAR(188):CHAR(189):CHAR(190):CHAR(191)
> NULLX=CHAR(186):CHAR(216):CHAR(222):CHAR(240):CHAR(247):CHAR(248)
> *
> UPA=CHAR(192):CHAR(193):CHAR(194):CHAR(195):CHAR(196):CHAR(197)
> LWA=CHAR(224):CHAR(225):CHAR(226):CHAR(227):CHAR(228):CHAR(229)
> RUA=STR('A',LEN(UPA))
> RLA=STR('a',LEN(LWA))
> UPE=CHAR(200):CHAR(201):CHAR(202):CHAR(203)
> LWE=CHAR(232):CHAR(233):CHAR(234):CHAR(235)
> RUE=STR('E',LEN(UPE))
> RLE=STR('e',LEN(LWE))
> UPI=CHAR(204):CHAR(205):CHAR(206):CHAR(207)
> LWI=CHAR(236):CHAR(237):CHAR(238):CHAR(239)
> RUI=STR('I',LEN(UPI))
> RLI=STR('i',LEN(LWI))
> UPO=CHAR(210):CHAR(211):CHAR(212):CHAR(213):CHAR(214)
> LWO=CHAR(242):CHAR(243):CHAR(244):CHAR(245):CHAR(246)
> RUO=STR('O',LEN(UPO))
> RLO=STR('o',LEN(LWO))
> UPU=CHAR(217):CHAR(218):CHAR(219):CHAR(220)
> LWU=CHAR(249):CHAR(250):CHAR(251):CHAR(252)
> RUU=STR('U',LEN(UPU))
> RLU=STR('u',LEN(LWU))
>
>
> SS1=CHAR(138):CHAR(142):CHAR(154):CHAR(158):CHAR(159):CHAR(199):CHAR(208):CHAR(209):CHAR(221):CHAR(223):CHAR(231)
> SR1="SZszYCDNYBc"
> SS2=CHAR(241):CHAR(253):CHAR(170):CHAR(215)
> SR2="nyax"
> *
> EXPR1=UPA:LWA:UPE:LWE:UPI:LWI:UPO:LWO:UPU:LWU:SS1:SS2
> EXPR2=RUA:RLA:RUE:RLE:RUI:RLI:RUO:RLO:RUU:RLU:SR1:SR2
> NULCHARS=NULL1:NULL2:NULL3:NULL4:NULL5:NULL6:NULLX:DEGREE
> *
> LIN=INDATA
> *
> LIN=CHANGE(LIN,CHAR(223),"SS")
> CONVERT EXPR1 TO EXPR2 IN LIN
> CONVERT NULCHARS TO "" IN LIN
> LIN=CHANGE(LIN,CHAR(230),"AE")
> LIN=CHANGE(LIN,UAE,"AE")
> LIN=CHANGE(LIN,LAE,"ae")
> *
> OUTDATA=LIN
> RETURN
> STOP
> END
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Bob Little
> Sent: Monday, November 25, 2013 3:10 PM
> To: U2 Users List [[email protected]]
> Subject: [U2] Working with accented characters
>
> To convert the first character of a regular ASCII string to
> uppercase, I'd use OCONV("STRING",'MCT') so that "STRING" is output
> as
> "String". However, this doesn't seem to work for Spanish accented
> characters. The machine is UV 11.1.11 with NLS enabled.
>
> What is the most elegant way to convert a name, such as JOSÉ to José
> ? I'm not a sys admin, so if it requires setting up an NLS map or
> something along those lines, I'm probably out of luck.
>
>
> bob little
> applications architect
> independent contractor
> market america, inc.
> 1302 pleasant ridge rd.
> greensboro, nc 27409
> Phone: 336-698-4367
> Cell: 248-675-5515
> Skype: boblittle904
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.