Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conversion from code page 860 to cp 850

Status
Not open for further replies.

nunoglopes

Programmer
Aug 8, 2000
3
0
0
PT
Visit site
I have my data bases in 850 cp and i would like to convert the information to 860, the problem is the special characters. I have clipper 5.01 does any body know what i can do
 
Modify this function as you need ( temporary from any CP to cp1250 CE)

funct fwCode(kaj)
local VVC:=KAJ
// in out
vvc:=strtran(vvc,chr(166),chr(142)) //Ž
vvc:=strtran(vvc,chr(230),chr(138)) //Š
vvc:=strtran(vvc,chr(172),chr(200)) //È
vvc:=strtran(vvc,chr(143),chr(198)) //Æ
vvc:=strtran(vvc,chr(209),chr(208)) //Ð
vvc:=strtran(vvc,chr(167),chr(158)) //ž
vvc:=strtran(vvc,chr(231),chr(154)) //š
vvc:=strtran(vvc,chr(159),chr(232)) //è
vvc:=strtran(vvc,chr(134),chr(230)) //æ
vvc:=strtran(vvc,chr(208),chr(240)) //ð
// 347
vvc:=strtran(vvc,chr(64 ),chr(142)) //Ž
vvc:=strtran(vvc,chr(91 ),chr(138)) //Š
vvc:=strtran(vvc,chr(94 ),chr(200)) //È
vvc:=strtran(vvc,chr(93 ),chr(198)) //Æ
vvc:=strtran(vvc,chr(92 ),chr(208)) //Ð
vvc:=strtran(vvc,chr(96 ),chr(158)) //ž
vvc:=strtran(vvc,chr(123),chr(154)) //š
vvc:=strtran(vvc,chr(126),chr(232)) //è
vvc:=strtran(vvc,chr(125),chr(230)) //æ
vvc:=strtran(vvc,chr(124),chr(240)) //ð
// 8-bit 8859-2
vvc:=strtran(vvc,chr(174),chr(142)) //Ž
vvc:=strtran(vvc,chr(169),chr(138)) //Š
vvc:=strtran(vvc,chr(200),chr(200)) //È
vvc:=strtran(vvc,chr(198),chr(198)) //Æ
vvc:=strtran(vvc,chr(208),chr(208)) //Ð
vvc:=strtran(vvc,chr(190),chr(158)) //ž
vvc:=strtran(vvc,chr(185),chr(154)) //š
vvc:=strtran(vvc,chr(232),chr(232)) //è
vvc:=strtran(vvc,chr(230),chr(230)) //æ
vvc:=strtran(vvc,chr(240),chr(240)) //ð
KAJ:=VVC
return (kaj)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top