Here you go:These are replacements for LCASE and UCASE.
Here is the full UDF Spec:
code:
cjLCASE
Author cj (chrismat@ozemail.com.au)
Action Equivalent to KiX function LCASE, but with support for extended language characters.
Syntax CJLCASE(string)
Parameters string
Required string to be changed to lowercase.
Returns The input string in lowercase.
Remarks Supports extended characters like É and Â.
Examples $word=cjLCASE("CLICHÉ")
Source
Function cjLCASE($x)
dim $y, $z
for $i=1 to len($x)
$y=asc(substr($x, $i, 1)) ; get next char
$z=$y ; set default
if $y<1 $y=$y+256 endif ; support for negative numbers from ASC()
if $y>64 and $y<91 ; normal char set
or $y>191 and $y<222 ; extended char set
$z=$y+32
endif
if $y=254 $z=222 endif ; special case
$cjLCASE=$cjLCASE+chr($z)
next
EndFunction
and
code:
cjUCASE
Author cj (chrismat@ozemail.com.au)
Action Equivalent to KiX function UCASE, but with support for extended language characters.
Syntax CJUCASE(string)
Parameters string
Required string to be changed to uppercase.
Returns The input string in uppercase.
Remarks Supports extended characters like é and â.
Examples $word=cjUCASE("resumé")
Source
Function cjUCASE($x)
dim $y, $z
for $i=1 to len($x)
$y=asc(substr($x, $i, 1)) ; get next char
$z=$y ; set default
if $y<1 $y=$y+256 endif ; support for negative numbers from ASC()
if $y>96 and $y<123 ; normal char set
or $y>223 and $y<254 ; extended char set
$z=$y-32
endif
if $y=222 $z=254 endif ; special case
$cjUCASE=$cjUCASE+chr($z)
next
EndFunction
cj
------------------
cj's scripts page
cj's User Guide - 14 May 2001
chrismat@ozemail.com.au
[This message has been edited by cj (edited 14 May 2001).]