Source language: Translate to:

Accented Letters Replace with normal letters?

General questions about NeoBook

Moderator: Neosoft Support

Accented Letters Replace with normal letters?

Postby Dudus » Mon Oct 02, 2017 4:36 am

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
User avatar
Dudus
 
Posts: 97
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest

Re: Accented Letters Replace with normal letters?

Postby JnCon » Fri Oct 13, 2017 6:40 am

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
JnCon
 
Posts: 4
Joined: Tue Sep 20, 2016 8:38 am

Re: Accented Letters Replace with normal letters?

Postby Dudus » Mon Oct 16, 2017 1:40 am

Great Work! Thanks :)
Köszönöm
User avatar
Dudus
 
Posts: 97
Joined: Wed Sep 07, 2005 12:15 pm
Location: Hungary, Budapest


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron