Page 1 of 1

Accented Letters Replace with normal letters?

PostPosted: Mon Oct 02, 2017 4:36 am
by Dudus
Accented Letters to normal?

Hi Folks,

I would have a question about whether it is possible to automatically change the accented letters to normal letters? Or do not let to type in TextField an accented letters?

Thank you!
Dudus

Re: Accented Letters Replace with normal letters?

PostPosted: Fri Oct 13, 2017 6:40 am
by JnCon
Helló,

meg tudod oldani pl. egy VB script függvénnyel:

Code: Select all
{NeoBook Function}
Version=5,80
Language=VBScript
Param=[%A]|Text|Input
Param=[%B]|Variable|Output
{End}
Function StripAccent (thestring)

Dim A, B, i

Const AccChars= "ŠŽšžYAÁÂAÄAÇEÉEËIÍÎI?NOÓÔOÖŐUÚUÜŰÝaáâaäaçeéeëiíîi?noóôoöuúuüűýy"
Const RegChars= "SZszYAAAAAACEEEEIIIIDNOOOOOUUUUUUYaaaaaaceeeeiiiidnooooouuuuuyy"
For i = 1 To Len(AccChars)
A = Mid(AccChars, i, 1)
B = Mid(RegChars, i, 1)
thestring = Replace(thestring, A, B)
Next
StripAccent = thestring
End Function
   

publication.nbSetVar "[%B]",  StripAccent("[%A]")


Elmented a Function library-be és Call paranccsal meghívod a NeoBook-ból.
Input: az ékezetes szöveg, amit át akarsz alakítani.
Output: a kimenő string változó.

Üdv
Péter

Re: Accented Letters Replace with normal letters?

PostPosted: Mon Oct 16, 2017 1:40 am
by Dudus
Great Work! Thanks :)
Köszönöm