Control Character added to string when reading file using regex pattern match

  • Автор темы Автор темы BlackSun
  • Дата начала Дата начала

BlackSun

Client
Регистрация
24.01.2011
Сообщения
119
Реакции
3
Баллы
0
This control character is added to the result string when using File.GetString macro and a regular expression pattern match.
Код:
Развернуть Свернуть Копировать

The control character will then break Javascript with this error if you try to use the string. "Exception has been thrown by the target of an invocation." :(
 
I see these exceptions on a regular basis, but I never could find out, why they happen. Thanks, I will investigate my templates for this. But what's the control character? The box above is empty...? If I know the character I could strip it from the string.
 
Unfortunately I don't know what the character is and it was stripped out when trying to post it here. Perhaps there is a way to look at it binary, but I haven't investigated it that far.
 
symbol_for_carriage_return.png


Is this the symbol because I get this a lot: carriage return
 
Yep that is what it looks like in the ProjectMaker output. Probably is a carriage return, comes just before the "end of line".
 
try saving your txt files as UTF-8 before using it with Zenno.
Also do this to csv files you might use (rename to txt, open with notepad, save as utf-8). Maybe rename it back to csv.
Please post here if it helps.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)