Ppl, After I set the environment variable LANG to pt_BR.UTF8 the string of the filename seems to be correct since I do not have to process it anymore to compare to undesirable chars.
The main goal has been achieved, the script is blocking undesirable chars but I still can't print the error message containing the wrong chars to the user. Subversion sends the following message: "[Error output could not be translated from the native locale to UTF-8.]" ____________________________________________ Rodrigo Montenegro de Oliveira On Fri, May 14, 2010 at 19:28, Ryan Schmidt <subversion-20...@ryandesign.com > wrote: > On May 14, 2010, at 07:40, Rodrigo Montenegro wrote: > > On Thu, May 13, 2010 at 22:42, Ryan Schmidt wrote: > >> On May 13, 2010, at 12:29, Rodrigo Montenegro wrote: > >> > >>> I am trying to block the users committing files with non-ASCII > characters in their names during the pre-commit hook script, but when I get > the list of files being committed with "svnlook changed" the filenames are > completely messed up. > >>> > >>> For example, a file named "ação.txt" when committed, has the string "A > trunk/a?\195?\167?\195?\163o1.txt" returned by the "svnlook changed" > command. > >>> > >> > >> > >> If you want to see the filenames as proper UTF-8 strings, you need to > set the LANG environment variable to the proper value for your system. > >> > > > > Well, I did: > > export LANG=pt_BR.UTF-8 and I got the same results. > > > > The previous set of LANG was en_US.UTF-8. > > > > Should I recompile subversion after set LANG to pt_BR ? > > Recompiling is not necessary. > > Where are you setting LANG? In this case, you should be setting it in your > pre-commit hook script. > > Remember to Reply All so this discussion takes place on the mailing list, > not in private email. > > >