Classic ASP - How to convert a UTF-8 string to UTF-16? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceUTF-16 encoding in HTMLClassic ASP - How to convert a UTF-8 string to UCS-2?convert utf-8 to iso-8859-1 in classic aspSending arabic SMS in kannelJQuery $.post() function is sending wrong charsetClassic ASP: Emit Response with charset UTF-16UTF-8 Server.UrlEncode problem in ASP ClassicClassic ASP, SQL Server and character encodingsMD5 on ASP Classic and .NETphp codes comparison with classic aspOutput an HTML from ASP Classic in a PHPConvert UTF-8 string to ISO-8859-1Classic ASP, file upload with HTTP POST requestClassic ASP Convert Latin Characters to Unicode Escape StringsASP classic CLng function - convert to PHPConverting Classic ASP LDAP Binding Script to PHP
Working through the single responsibility principle (SRP) in Python when calls are expensive
Do I have Disadvantage attacking with an off-hand weapon?
"is" operation returns false with ndarray.data attribute, even though two array objects have same id
Presidential Pardon
How did passengers keep warm on sail ships?
Loose spokes after only a few rides
How to read αἱμύλιος or when to aspirate
Am I ethically obligated to go into work on an off day if the reason is sudden?
Sort list of array linked objects by keys and values
What happens to a Warlock's expended Spell Slots when they gain a Level?
Could an empire control the whole planet with today's comunication methods?
Is an up-to-date browser secure on an out-of-date OS?
Are there continuous functions who are the same in an interval but differ in at least one other point?
Can a flute soloist sit?
How do spell lists change if the party levels up without taking a long rest?
Example of compact Riemannian manifold with only one geodesic.
What force causes entropy to increase?
"... to apply for a visa" or "... and applied for a visa"?
What do I do when my TA workload is more than expected?
Word for: a synonym with a positive connotation?
Homework question about an engine pulling a train
Can the DM override racial traits?
My body leaves; my core can stay
Are spiders unable to hurt humans, especially very small spiders?
Classic ASP - How to convert a UTF-8 string to UTF-16?
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceUTF-16 encoding in HTMLClassic ASP - How to convert a UTF-8 string to UCS-2?convert utf-8 to iso-8859-1 in classic aspSending arabic SMS in kannelJQuery $.post() function is sending wrong charsetClassic ASP: Emit Response with charset UTF-16UTF-8 Server.UrlEncode problem in ASP ClassicClassic ASP, SQL Server and character encodingsMD5 on ASP Classic and .NETphp codes comparison with classic aspOutput an HTML from ASP Classic in a PHPConvert UTF-8 string to ISO-8859-1Classic ASP, file upload with HTTP POST requestClassic ASP Convert Latin Characters to Unicode Escape StringsASP classic CLng function - convert to PHPConverting Classic ASP LDAP Binding Script to PHP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I know there is already have post: Classic ASP - How to convert a UTF-8 string to UCS-2?
But my situation another.
I want convert UTF-8 to UCS-2BE.
For example this text in UTF-8 "Мухтарам Мизоч" convert to this "CEB0@0<� 87>G".
For example in PHP i can use ready function iconv("utf-8","ucs-2be","Мухтарам Мизоч");
But in classical ASP can't find any solution.
This solution need for send Unicode SMS text via Kannel.
asp-classic kannel
add a comment |
I know there is already have post: Classic ASP - How to convert a UTF-8 string to UCS-2?
But my situation another.
I want convert UTF-8 to UCS-2BE.
For example this text in UTF-8 "Мухтарам Мизоч" convert to this "CEB0@0<� 87>G".
For example in PHP i can use ready function iconv("utf-8","ucs-2be","Мухтарам Мизоч");
But in classical ASP can't find any solution.
This solution need for send Unicode SMS text via Kannel.
asp-classic kannel
Take a look at this answer, like you the OP was trying to send to an SMS Provider - Answer to convert utf-8 to iso-8859-1 in classic asp.
– Lankymart
Sep 3 '14 at 13:10
The difference is your passing inUTF-8
and want to outputUTF-16
(supersedesUCS-2
) the process is identical.
– Lankymart
Sep 3 '14 at 13:17
I've dug into this a bit more as I'm not familiar with the Kannel SMS Gateway. What version are you using? Looking at the user guide suggests that by default thecoding
parameter is set to 7 bits when using thesendsms
cgi script so you should be able to sendUTF-8
is it possible to update your question and add some code that shows you trying to send the message to thesendsms
cgi script?
– Lankymart
Sep 4 '14 at 13:58
add a comment |
I know there is already have post: Classic ASP - How to convert a UTF-8 string to UCS-2?
But my situation another.
I want convert UTF-8 to UCS-2BE.
For example this text in UTF-8 "Мухтарам Мизоч" convert to this "CEB0@0<� 87>G".
For example in PHP i can use ready function iconv("utf-8","ucs-2be","Мухтарам Мизоч");
But in classical ASP can't find any solution.
This solution need for send Unicode SMS text via Kannel.
asp-classic kannel
I know there is already have post: Classic ASP - How to convert a UTF-8 string to UCS-2?
But my situation another.
I want convert UTF-8 to UCS-2BE.
For example this text in UTF-8 "Мухтарам Мизоч" convert to this "CEB0@0<� 87>G".
For example in PHP i can use ready function iconv("utf-8","ucs-2be","Мухтарам Мизоч");
But in classical ASP can't find any solution.
This solution need for send Unicode SMS text via Kannel.
asp-classic kannel
asp-classic kannel
edited May 23 '17 at 12:32
Community♦
11
11
asked Sep 3 '14 at 11:09
Farhod HojievFarhod Hojiev
32
32
Take a look at this answer, like you the OP was trying to send to an SMS Provider - Answer to convert utf-8 to iso-8859-1 in classic asp.
– Lankymart
Sep 3 '14 at 13:10
The difference is your passing inUTF-8
and want to outputUTF-16
(supersedesUCS-2
) the process is identical.
– Lankymart
Sep 3 '14 at 13:17
I've dug into this a bit more as I'm not familiar with the Kannel SMS Gateway. What version are you using? Looking at the user guide suggests that by default thecoding
parameter is set to 7 bits when using thesendsms
cgi script so you should be able to sendUTF-8
is it possible to update your question and add some code that shows you trying to send the message to thesendsms
cgi script?
– Lankymart
Sep 4 '14 at 13:58
add a comment |
Take a look at this answer, like you the OP was trying to send to an SMS Provider - Answer to convert utf-8 to iso-8859-1 in classic asp.
– Lankymart
Sep 3 '14 at 13:10
The difference is your passing inUTF-8
and want to outputUTF-16
(supersedesUCS-2
) the process is identical.
– Lankymart
Sep 3 '14 at 13:17
I've dug into this a bit more as I'm not familiar with the Kannel SMS Gateway. What version are you using? Looking at the user guide suggests that by default thecoding
parameter is set to 7 bits when using thesendsms
cgi script so you should be able to sendUTF-8
is it possible to update your question and add some code that shows you trying to send the message to thesendsms
cgi script?
– Lankymart
Sep 4 '14 at 13:58
Take a look at this answer, like you the OP was trying to send to an SMS Provider - Answer to convert utf-8 to iso-8859-1 in classic asp.
– Lankymart
Sep 3 '14 at 13:10
Take a look at this answer, like you the OP was trying to send to an SMS Provider - Answer to convert utf-8 to iso-8859-1 in classic asp.
– Lankymart
Sep 3 '14 at 13:10
The difference is your passing in
UTF-8
and want to output UTF-16
(supersedes UCS-2
) the process is identical.– Lankymart
Sep 3 '14 at 13:17
The difference is your passing in
UTF-8
and want to output UTF-16
(supersedes UCS-2
) the process is identical.– Lankymart
Sep 3 '14 at 13:17
I've dug into this a bit more as I'm not familiar with the Kannel SMS Gateway. What version are you using? Looking at the user guide suggests that by default the
coding
parameter is set to 7 bits when using the sendsms
cgi script so you should be able to send UTF-8
is it possible to update your question and add some code that shows you trying to send the message to the sendsms
cgi script?– Lankymart
Sep 4 '14 at 13:58
I've dug into this a bit more as I'm not familiar with the Kannel SMS Gateway. What version are you using? Looking at the user guide suggests that by default the
coding
parameter is set to 7 bits when using the sendsms
cgi script so you should be able to send UTF-8
is it possible to update your question and add some code that shows you trying to send the message to the sendsms
cgi script?– Lankymart
Sep 4 '14 at 13:58
add a comment |
2 Answers
2
active
oldest
votes
So sick of answering this question, but I feel impelled to as you have made a common assumption that many make when it comes to encoding in ASP, PHP or whatever language you are using.
In web development encoding is intrinsically linked to
The source encoding you use to save the web page
Just looking at the comments under the iconv reference made me laugh and sad at the same time because there are so many people out there who don't understand this topic.
Take for example your PHP snippet
iconv("utf-8","ucs-2be","Мухтарам Мизоч");
This will work providing the following is true
- The page author saved the file using
UTF-8
encoding (Most modern editors have this option in some shape or form). The client Internet Browser knows it should be handling the page as
UTF-8
either via a meta tag in the HTML,<meta http-equiv="content-type" content="text/html; charset=utf-8">
or by specifying a HTTP Content-Type Header
In terms of Classic ASP it is the same you need to;
Make sure the page is saved as
UTF-8
encoding, this includes any#include
files that are dependencies.Tell IIS that your pages are
UTF-8
by specifying this pre-processing instruction at the very top of the page (must be the first line).<%@Language="VBScript" CodePage = 65001 %>
Tell the browser what encoding you are using
<%
'Tell server to send all strings back to the client as UTF-8
'while also setting the charset in the HTTP Content Type header.
Responce.CodePage = 65001
Response.ContentType = "html/text"
Response.Charset = "UTF-8"
%>
UPDATE:
Neither UCS-2
(UTF-16
LE) or UCS-2BE
(UTF-16
BE) are supported by Classic ASP, specifying either CodePage
(1200 or 1201) will result in;
ASP 0203 - Invalid CodePage Value
After reading a bit about Kannel it does appear as though you can control the character set you send to the SMS gateway, I would recommend you try to send it using UTF-8
.
Links
Sending arabic SMS in kannel (This question is about sending arabic SMS using Java to Kannel but the information is relevant).
Unicode on Windows XP (Although aimed at Windows XP the codepage information is still relevant).
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
1
You maybe right, asUTF-16
does not supersedeUCS-2BE
(big endian) it's supersedesUCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will getASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send usingUTF-8
which from what I have read it is more then capable of doing.
– Lankymart
Sep 4 '14 at 12:42
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
1
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
add a comment |
in kannel.conf in section SMSC add alt-charset = UCS-2 (or UCS-2BE) thats enough. Kannel well send to smsc in this charset.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25642816%2fclassic-asp-how-to-convert-a-utf-8-string-to-utf-16%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
So sick of answering this question, but I feel impelled to as you have made a common assumption that many make when it comes to encoding in ASP, PHP or whatever language you are using.
In web development encoding is intrinsically linked to
The source encoding you use to save the web page
Just looking at the comments under the iconv reference made me laugh and sad at the same time because there are so many people out there who don't understand this topic.
Take for example your PHP snippet
iconv("utf-8","ucs-2be","Мухтарам Мизоч");
This will work providing the following is true
- The page author saved the file using
UTF-8
encoding (Most modern editors have this option in some shape or form). The client Internet Browser knows it should be handling the page as
UTF-8
either via a meta tag in the HTML,<meta http-equiv="content-type" content="text/html; charset=utf-8">
or by specifying a HTTP Content-Type Header
In terms of Classic ASP it is the same you need to;
Make sure the page is saved as
UTF-8
encoding, this includes any#include
files that are dependencies.Tell IIS that your pages are
UTF-8
by specifying this pre-processing instruction at the very top of the page (must be the first line).<%@Language="VBScript" CodePage = 65001 %>
Tell the browser what encoding you are using
<%
'Tell server to send all strings back to the client as UTF-8
'while also setting the charset in the HTTP Content Type header.
Responce.CodePage = 65001
Response.ContentType = "html/text"
Response.Charset = "UTF-8"
%>
UPDATE:
Neither UCS-2
(UTF-16
LE) or UCS-2BE
(UTF-16
BE) are supported by Classic ASP, specifying either CodePage
(1200 or 1201) will result in;
ASP 0203 - Invalid CodePage Value
After reading a bit about Kannel it does appear as though you can control the character set you send to the SMS gateway, I would recommend you try to send it using UTF-8
.
Links
Sending arabic SMS in kannel (This question is about sending arabic SMS using Java to Kannel but the information is relevant).
Unicode on Windows XP (Although aimed at Windows XP the codepage information is still relevant).
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
1
You maybe right, asUTF-16
does not supersedeUCS-2BE
(big endian) it's supersedesUCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will getASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send usingUTF-8
which from what I have read it is more then capable of doing.
– Lankymart
Sep 4 '14 at 12:42
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
1
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
add a comment |
So sick of answering this question, but I feel impelled to as you have made a common assumption that many make when it comes to encoding in ASP, PHP or whatever language you are using.
In web development encoding is intrinsically linked to
The source encoding you use to save the web page
Just looking at the comments under the iconv reference made me laugh and sad at the same time because there are so many people out there who don't understand this topic.
Take for example your PHP snippet
iconv("utf-8","ucs-2be","Мухтарам Мизоч");
This will work providing the following is true
- The page author saved the file using
UTF-8
encoding (Most modern editors have this option in some shape or form). The client Internet Browser knows it should be handling the page as
UTF-8
either via a meta tag in the HTML,<meta http-equiv="content-type" content="text/html; charset=utf-8">
or by specifying a HTTP Content-Type Header
In terms of Classic ASP it is the same you need to;
Make sure the page is saved as
UTF-8
encoding, this includes any#include
files that are dependencies.Tell IIS that your pages are
UTF-8
by specifying this pre-processing instruction at the very top of the page (must be the first line).<%@Language="VBScript" CodePage = 65001 %>
Tell the browser what encoding you are using
<%
'Tell server to send all strings back to the client as UTF-8
'while also setting the charset in the HTTP Content Type header.
Responce.CodePage = 65001
Response.ContentType = "html/text"
Response.Charset = "UTF-8"
%>
UPDATE:
Neither UCS-2
(UTF-16
LE) or UCS-2BE
(UTF-16
BE) are supported by Classic ASP, specifying either CodePage
(1200 or 1201) will result in;
ASP 0203 - Invalid CodePage Value
After reading a bit about Kannel it does appear as though you can control the character set you send to the SMS gateway, I would recommend you try to send it using UTF-8
.
Links
Sending arabic SMS in kannel (This question is about sending arabic SMS using Java to Kannel but the information is relevant).
Unicode on Windows XP (Although aimed at Windows XP the codepage information is still relevant).
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
1
You maybe right, asUTF-16
does not supersedeUCS-2BE
(big endian) it's supersedesUCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will getASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send usingUTF-8
which from what I have read it is more then capable of doing.
– Lankymart
Sep 4 '14 at 12:42
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
1
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
add a comment |
So sick of answering this question, but I feel impelled to as you have made a common assumption that many make when it comes to encoding in ASP, PHP or whatever language you are using.
In web development encoding is intrinsically linked to
The source encoding you use to save the web page
Just looking at the comments under the iconv reference made me laugh and sad at the same time because there are so many people out there who don't understand this topic.
Take for example your PHP snippet
iconv("utf-8","ucs-2be","Мухтарам Мизоч");
This will work providing the following is true
- The page author saved the file using
UTF-8
encoding (Most modern editors have this option in some shape or form). The client Internet Browser knows it should be handling the page as
UTF-8
either via a meta tag in the HTML,<meta http-equiv="content-type" content="text/html; charset=utf-8">
or by specifying a HTTP Content-Type Header
In terms of Classic ASP it is the same you need to;
Make sure the page is saved as
UTF-8
encoding, this includes any#include
files that are dependencies.Tell IIS that your pages are
UTF-8
by specifying this pre-processing instruction at the very top of the page (must be the first line).<%@Language="VBScript" CodePage = 65001 %>
Tell the browser what encoding you are using
<%
'Tell server to send all strings back to the client as UTF-8
'while also setting the charset in the HTTP Content Type header.
Responce.CodePage = 65001
Response.ContentType = "html/text"
Response.Charset = "UTF-8"
%>
UPDATE:
Neither UCS-2
(UTF-16
LE) or UCS-2BE
(UTF-16
BE) are supported by Classic ASP, specifying either CodePage
(1200 or 1201) will result in;
ASP 0203 - Invalid CodePage Value
After reading a bit about Kannel it does appear as though you can control the character set you send to the SMS gateway, I would recommend you try to send it using UTF-8
.
Links
Sending arabic SMS in kannel (This question is about sending arabic SMS using Java to Kannel but the information is relevant).
Unicode on Windows XP (Although aimed at Windows XP the codepage information is still relevant).
So sick of answering this question, but I feel impelled to as you have made a common assumption that many make when it comes to encoding in ASP, PHP or whatever language you are using.
In web development encoding is intrinsically linked to
The source encoding you use to save the web page
Just looking at the comments under the iconv reference made me laugh and sad at the same time because there are so many people out there who don't understand this topic.
Take for example your PHP snippet
iconv("utf-8","ucs-2be","Мухтарам Мизоч");
This will work providing the following is true
- The page author saved the file using
UTF-8
encoding (Most modern editors have this option in some shape or form). The client Internet Browser knows it should be handling the page as
UTF-8
either via a meta tag in the HTML,<meta http-equiv="content-type" content="text/html; charset=utf-8">
or by specifying a HTTP Content-Type Header
In terms of Classic ASP it is the same you need to;
Make sure the page is saved as
UTF-8
encoding, this includes any#include
files that are dependencies.Tell IIS that your pages are
UTF-8
by specifying this pre-processing instruction at the very top of the page (must be the first line).<%@Language="VBScript" CodePage = 65001 %>
Tell the browser what encoding you are using
<%
'Tell server to send all strings back to the client as UTF-8
'while also setting the charset in the HTTP Content Type header.
Responce.CodePage = 65001
Response.ContentType = "html/text"
Response.Charset = "UTF-8"
%>
UPDATE:
Neither UCS-2
(UTF-16
LE) or UCS-2BE
(UTF-16
BE) are supported by Classic ASP, specifying either CodePage
(1200 or 1201) will result in;
ASP 0203 - Invalid CodePage Value
After reading a bit about Kannel it does appear as though you can control the character set you send to the SMS gateway, I would recommend you try to send it using UTF-8
.
Links
Sending arabic SMS in kannel (This question is about sending arabic SMS using Java to Kannel but the information is relevant).
Unicode on Windows XP (Although aimed at Windows XP the codepage information is still relevant).
edited Mar 8 at 12:42
answered Sep 3 '14 at 13:49
LankymartLankymart
11.9k442108
11.9k442108
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
1
You maybe right, asUTF-16
does not supersedeUCS-2BE
(big endian) it's supersedesUCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will getASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send usingUTF-8
which from what I have read it is more then capable of doing.
– Lankymart
Sep 4 '14 at 12:42
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
1
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
add a comment |
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
1
You maybe right, asUTF-16
does not supersedeUCS-2BE
(big endian) it's supersedesUCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will getASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send usingUTF-8
which from what I have read it is more then capable of doing.
– Lankymart
Sep 4 '14 at 12:42
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
1
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
I think doing it right, but i'm get in UTF-16 "믯킿톜톃톅킂톰킀킰₼鳐룐럐뻐蟑" in PHP i get "CEB0@0<� 87>G". May be UTF-16 and UCS-2be not same?
– Farhod Hojiev
Sep 3 '14 at 20:34
1
1
You maybe right, as
UTF-16
does not supersede UCS-2BE
(big endian) it's supersedes UCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will get ASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send using UTF-8
which from what I have read it is more then capable of doing.– Lankymart
Sep 4 '14 at 12:42
You maybe right, as
UTF-16
does not supersede UCS-2BE
(big endian) it's supersedes UCS-2
. What's more neither are supported in IIS / Classic ASP, if you try to set them you will get ASP 0203 - Invalid CodePage Value
. You need to configure Kannel to send using UTF-8
which from what I have read it is more then capable of doing.– Lankymart
Sep 4 '14 at 12:42
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
Great explanation, @Lankymart +1.
– Paul
Sep 4 '14 at 14:44
1
1
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Yes, i'm decide my problem with setting in Kannel "coding=UTF-8".
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
Thank you very much.
– Farhod Hojiev
Sep 6 '14 at 20:58
add a comment |
in kannel.conf in section SMSC add alt-charset = UCS-2 (or UCS-2BE) thats enough. Kannel well send to smsc in this charset.
add a comment |
in kannel.conf in section SMSC add alt-charset = UCS-2 (or UCS-2BE) thats enough. Kannel well send to smsc in this charset.
add a comment |
in kannel.conf in section SMSC add alt-charset = UCS-2 (or UCS-2BE) thats enough. Kannel well send to smsc in this charset.
in kannel.conf in section SMSC add alt-charset = UCS-2 (or UCS-2BE) thats enough. Kannel well send to smsc in this charset.
answered Aug 3 '16 at 4:34
BDalerBDaler
13
13
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25642816%2fclassic-asp-how-to-convert-a-utf-8-string-to-utf-16%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Take a look at this answer, like you the OP was trying to send to an SMS Provider - Answer to convert utf-8 to iso-8859-1 in classic asp.
– Lankymart
Sep 3 '14 at 13:10
The difference is your passing in
UTF-8
and want to outputUTF-16
(supersedesUCS-2
) the process is identical.– Lankymart
Sep 3 '14 at 13:17
I've dug into this a bit more as I'm not familiar with the Kannel SMS Gateway. What version are you using? Looking at the user guide suggests that by default the
coding
parameter is set to 7 bits when using thesendsms
cgi script so you should be able to sendUTF-8
is it possible to update your question and add some code that shows you trying to send the message to thesendsms
cgi script?– Lankymart
Sep 4 '14 at 13:58