CLOSE TABLES

USE d:\2009\robno\baze\roba ALIAS roba EXCLUSIVE IN 0
SELECT ROBA
GOTO TOP

DO WHILE !EOF()
A4=ROBA.NAZIV

a4=UPPER(naziv)
a4=konvertuj(a4,"CCC","È")
a4=konvertuj(a4,"CC","Æ")
a4=konvertuj(a4,"DJ","Ð")
a4=konvertuj(a4,"ZZ","Ž")
a4=konvertuj(a4,"SS","Š")

replace roba.naziv	WITH a4
SKIP
ENDDO
RETURN



FUNCTION KONVeRTUJ(STA,menjam,CIME)
Ml1=LEN(ALLTRIM(sta))
ml2=LEN(ALLTRIM(cime))
ml3=LEN(ALLTRIM(menjam))
FOR i=1 TO ml1
mpoz=AT(menjam,sta)
IF mpoz>0
	sta1=SUBSTR(sta,1,mpoz-1)
	sta1=sta1+cime+SUBSTR(sta,mpoz+ml3,ml1-(mpoz+ml3-1))
	sta=sta1
ENDIF
NEXT i
return(sta)	
