![]() |
#1 |
Junior Member
Join Date: Aug 2021
Posts: 5
|
Prevent double byte characters
Is there a way to prevent double byte characters being used user inputted text fields ? I only want charcaters in the range of (! - ~ ) I need to interact with an old ini file that doesn't like double byte characters.
Its a username and password field so I was thinking of using a regex maybe. But just wondering if there is another way of banning them outright |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,484
|
Filtering on the fly is a bit tricky.
A slightly less elegant method is to NSD_GetText in the page leave callback (you are probably doing this anyway?) and check the string. You can take a look at the answer here where I'm checking a string with regex and checking ASCII codes... IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
|
Tags |
nsis |
Thread Tools | Search this Thread |
Display Modes | |
|
|