473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to support Unicode for Embeded Perl

Hi,

The output of the pl files to be displayed in my vc++ application. I used Embeded Perl for it. I have to support Japanese for the application.

The samp.pl file contains the following code

print "こんにちは "; #print "Hello"

For converting string to Unicode, I used the following code
STRLEN Len;
bytes_to_utf8( (U8*)SvPV(ST(0), Len), &Len);

It is displaying "Sテ」ツつ禿」ツ・ォテ」ツ・。テ」ツ・ッテ」ツ" instead of "こんにちは "

Please could u specify the procedure for converting string to Unicode or if possible could u provide the links for achieving this task. It would be appreciated if any suggestions are given.



Regards,
nag.
Oct 9 '07 #1
3 1414
numberwhun
3,509 Expert Mod 2GB
Hi,

The output of the pl files to be displayed in my vc++ application. I used Embeded Perl for it. I have to support Japanese for the application.

The samp.pl file contains the following code

print "こんにちは "; #print "Hello"

For converting string to Unicode, I used the following code
STRLEN Len;
bytes_to_utf8( (U8*)SvPV(ST(0), Len), &Len);

It is displaying "Sテ」ツつ禿」ツ・ォテ」ツ・。テ」ツ・ッテ」ツ" instead of "こんにちは "

Please could u specify the procedure for converting string to Unicode or if possible could u provide the links for achieving this task. It would be appreciated if any suggestions are given.



Regards,
nag.
Considering that I don't think there is any "STRLEN" function in Perl, I am going to assume that this is a C++ question. Can you please confirm this so that I may move this question to the appropriate forum?

Thank you!

-Moderator
Oct 9 '07 #2
Considering that I don't think there is any "STRLEN" function in Perl, I am going to assume that this is a C++ question. Can you please confirm this so that I may move this question to the appropriate forum?

Thank you!

-Moderator
STRLEN Macro is present and it will be useful when Perl interpreter is integrated in C program. Please refer perlembed


Regards,
nag.
Oct 11 '07 #3
numberwhun
3,509 Expert Mod 2GB
STRLEN Macro is present and it will be useful when Perl interpreter is integrated in C program. Please refer perlembed


Regards,
nag.
Ok, then I have no idea as I have no experience with embedded Perl, sorry.
Oct 11 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Stuart Gerchick | last post by:
When will PHP properly support UNICODE
9
by: zyqnews | last post by:
hello all, I am new in Python. And I have got a problem about unicode. I have got a unicode string, when I was going to send it out throuth a socket by send(), I got an exception. How can I send...
5
by: Xah Lee | last post by:
python has this nice unicodedata module that deals with unicode nicely. #-*- coding: utf-8 -*- # python from unicodedata import * # each unicode char has a unique name. # one can use the...
0
by: penguinista | last post by:
Using embeded perl in a project along with other large libraries. Running into a nasty pointer related bug. Would there be problems in mixing perls heap management functions (perl and my code) and...
6
by: Spamtrap | last post by:
I only work in Perl occasionaly, and have been searching for a solution for a conversion, and everything I found seems much too complex. All I need to do is take a simple text file and copy...
6
by: peter pilsl | last post by:
postgres 7.3.2 I store unicode-data in postgresql. The data is retrieved via webinterfaces, processed with perl and then stored in postgresql (and viceversa). All is going nice with one...
3
by: Kieran Green | last post by:
Greetings, We are building an application written for Windows in C++ which uses OLEDB to connect to AIX DB2 8.2. Our app stores all string data in the wchar_t datatype, which generates dynamic...
8
by: rkellerjr | last post by:
I have just delved into the world of Unicode versus Latin1. I've written a quick program (ignore some of the messy code, it's been a work in progress) that traps a string of text that contains...
2
by: Roberto | last post by:
When will PHP get Unicode support for PHP5? I realize that English is what everyone speaks when they want to do business, but I potentially could be not getting clients for my freelancing work...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.