How to convert unicode special characters to html?

gambit

Client
Регистрация
03.03.2013
Сообщения
5
Благодарностей
0
Баллы
0
Hi!
I have some problem - in my language there are many special characters like ex. "ą" "ź" etc. I need to convert them to html so they look like "ą" "ź" - you can see it on this site - http://www.unicodetools.com/unicode/convert-to-html.php

However I cannot use this site for this purpose and I need Zennoposter to convert special characters on its own. Is it possible? I'm sure it can be done it with some C+ or Javascript but I'm not a programmer and I failed after many attempts to create some codes from what I found on different tutorials on the internet.

Maybe somebody will help with this?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hi!
I have some problem - in my language there are many special characters like ex. "ą" "ź" etc. I need to convert them to html so they look like "ą" "ź" - you can see it on this site - http://www.unicodetools.com/unicode/convert-to-html.php

However I cannot use this site for this purpose and I need Zennoposter to convert special characters on its own. Is it possible? I'm sure it can be done it with some C+ or Javascript but I'm not a programmer and I failed after many attempts to create some codes from what I found on different tutorials on the internet.

Maybe somebody will help with this?
Please show what tutorials did you found and tried out...

Cheers
 
Последнее редактирование:

gambit

Client
Регистрация
03.03.2013
Сообщения
5
Благодарностей
0
Баллы
0
There are no tutorials for this type of effect I want. I just try different C+ templates I found on this forum and try to build sth myself but I didn't succeed.
I think that sb can have solution for this because there is Russian part of forum and I'm sure they have the same problem with their alphabet.

I need to have it convertet for html to post it via xmlrpc to wordpress because when there are special characters the xmlrpc doesn't work.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Did you tried to use google ?

Sorry for such sarcasm, but there is just one line of code and this one line of code you can get from first page in google, if you search for term you are needed.

You should use a little your brain before asking for help...

And on other note zennoposter uses C# and not C+

Cheers
 

gambit

Client
Регистрация
03.03.2013
Сообщения
5
Благодарностей
0
Баллы
0
As I said I don't know any single command in C# or Java, I'm not coder. I tried different solution for more than 5 hours and nothing didn't work. I can post here more than 100 urls that I visited but that's not the point..

I saw some templates here with C# (that encoding to sth else that I need) and they work but when I googled for some C# code and I pasted it in template there was always error and it didn't proceed. I saw that for some templates I should use 'References' but I don't know how this work and what I should choose - maybe that's the problem.

I thnik that close solution to my problem is that template from one topic - http://zennolab.com/discussion/attachment.php?attachmentid=3159&d=1360077480
but it converts to sth else that I need.
 

gambit

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

zeus

Client
Регистрация
03.07.2012
Сообщения
99
Благодарностей
21
Баллы
18

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
As I said I used google and I saw this page and it's not solution for my problem - this shows how to convert html to utf and I want to convert utf to html. I don't know any classes in C# so this link is useless for me cause I don't know how to change it opposite way.
JavaScript:
string text =  System.Net.WebUtility.HtmlEncode("text to encode");
return text;
Cheers
 

gambit

Client
Регистрация
03.03.2013
Сообщения
5
Благодарностей
0
Баллы
0
Above doeasn't work beacuse this 'HtmlEncode' doesn't encode special characters from different countries for which i in 1st post.

However I figure out how to do it so if anybody looks for C# code to convert special characters from his lanugage the easiest way is to use replace function that looks like this (example is for polish special characters):

Код:
string input = project.Variables["teksty"].Value;
input = input.Replace("ą",@"ą");
input = input.Replace("ę",@"ę");
input = input.Replace("ó",@"ó");
input = input.Replace("ś",@"ś");
input = input.Replace("ż",@"ż");
input = input.Replace("ź",@"ź");
input = input.Replace("ć",@"ć");
input = input.Replace("ń",@"ń");
input = input.Replace("Ę",@"Ę");
input = input.Replace("Ó",@"Ó");
input = input.Replace("Ą",@"Ą");
input = input.Replace("Ś",@"Ś");
input = input.Replace("Ż",@"Ż");
input = input.Replace("Ź",@"Ź");
input = input.Replace("Ć",@"Ć");
input = input.Replace("Ń",@"Ń");
input = input.Replace("ł",@"ł");
input = input.Replace("Ł",@"Ł");
return input;
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Something like this maybe )
 

Вложения

  • Спасибо
Реакции: Kepperbes

Kepperbes

Client
Регистрация
19.12.2011
Сообщения
243
Благодарностей
81
Баллы
28

valteau

Client
Регистрация
06.07.2018
Сообщения
133
Благодарностей
3
Баллы
18
Код:
string text = Uri.EscapeDataString(project.Variables["FB_MdP"].Value);
return text;
This ONe Is Work Well Also ! :-)
 
  • Спасибо
Реакции: daymos

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