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

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." :(
 

Stereomike

Client
Регистрация
29.03.2011
Сообщения
221
Благодарностей
30
Баллы
0
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.
 

BlackSun

Client
Регистрация
24.01.2011
Сообщения
119
Благодарностей
3
Баллы
0
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.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
you may attach it in archive
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113


Is this the symbol because I get this a lot: carriage return
 

BlackSun

Client
Регистрация
24.01.2011
Сообщения
119
Благодарностей
3
Баллы
0
Yep that is what it looks like in the ProjectMaker output. Probably is a carriage return, comes just before the "end of line".
 

Stereomike

Client
Регистрация
29.03.2011
Сообщения
221
Благодарностей
30
Баллы
0
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.
 

BlackSun

Client
Регистрация
24.01.2011
Сообщения
119
Благодарностей
3
Баллы
0

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