Wordai Special characters

alexono1

Новичок
Регистрация
04.12.2013
Сообщения
4
Благодарностей
0
Баллы
1
Hi!

I'm using Zennoposter 5.10.0.2 together with the wordai option.
I notice that when I'm using french text all special characters are returned as ??
It looks like I have to set utf-8 somewhere, but I don't see any option for that.

Does anyone know how to solve this?

Edit: For instance when I use the translation option, it does return accent characters...
 
Последнее редактирование:

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 226
Благодарностей
5 844
Баллы
113
Hello,

You should set French language for non-unicode program in Regional settings on Control panel in your system.
 

alexono1

Новичок
Регистрация
04.12.2013
Сообщения
4
Благодарностей
0
Баллы
1
Just tried this exact setting... Unfortunately I still have the special characters replaced with ???
Any more ideas?

I think it really has to do with the WordAI part of the Zennoposter... When I use translation service from english to french, everything is fine, characters are generated just fine.

Is this a ZennoPoster Bug?
 
Последнее редактирование:

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 226
Благодарностей
5 844
Баллы
113
Try converting text to UTF-8 before putting it into WordAI.
Код:
string content = project.Variables["Text"].Value;
Encoding utf8 = Encoding.GetEncoding("UTF-8");
Encoding win1251 = Encoding.GetEncoding("Windows-1251");
byte[] win1251Bytes = utf8.GetBytes(content);
byte[] utf8Bytes = Encoding.Convert(win1251, utf8, win1251Bytes);
return utf8.GetString(utf8Bytes);
 

alexono1

Новичок
Регистрация
04.12.2013
Сообщения
4
Благодарностей
0
Баллы
1
Actually this will return the content like this:

from:
Dans le respect et la dignité<br />A côté de chez moi Argenteuil<br />

to:

Dans le respect et la dignitГ©<br />A cГґtГ© de chez moi Argenteuil<br />
 

alexono1

Новичок
Регистрация
04.12.2013
Сообщения
4
Благодарностей
0
Баллы
1
This post never got updated... But I think there is a bug in the WordAI module. When I create a http post request step, this problem won't occur.
I think the Zenno Version of the WordAI processer just won't post UTF-8 stuff.
BTW: Another nice feature of the WordAI module would be to send large texts splitted up, because when you try to do that now, it will just timeout all the time. Even if you play with the parameters.
 

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