Unicode hex conversion
Hello, can anyone please tell me how to achieve the same effect on this website, http://mylanguages.org/converter.php , in pl sql or oracle sql? They have taken an arabic string and returned a (to my knowledge) hex value.
Many Thanks
Handle: igwe
Status Level: Newbie (15)
Registered: Mar 11, 2008
Total Posts: 384
Total Questions: 148 (83 unresolved) Do you ask so many difficult questions or don't you mark questions as answerd when they are?
with inp as
( select 'سليم' str from dual
union all select 'anton' from dual
select ( select listagg( '&#' || to_number( utl_raw.substr( utl_i18n.string_to_raw( str, 'AL16UTF16' ), level * 2 - 1, 2 ), 'XXXX' ) || ';' ) within group ( order by level )
from dual
connect by level <= length( str )
from inpEdited by: ascheffer on Mar 5, 2013 11:33 PM
Similar Messages
-
DECIMAL = HEX CONVERSION PACKAGE 생성 SCRIPT
제품 : SQL*PLUS
작성날짜 : 2002-04-12
DECIMAL <=> HEX CONVERSION PACKAGE 생성 SCRIPT
==============================================
Purpose
Oracle내에서는 여러가지 값을 HEX 값으로 보여주는 경우가 있다.
이런 경우 DB내에서 decimal 값으로 변환하기 위한 방법을 알아보자.
Explanation
다음은 decimal <=> hexa 의 conversion을 위한 package 생성문으로서
system user로 수행하여 사용한다.
create or replace package support as
function dectohex (a number) return varchar2;
pragma restrict_references
(dectohex, WNDS, WNPS, RNDS, RNPS);
function hextodec (a varchar2) return number;
pragma restrict_references
(hextodec, WNDS, WNPS, RNDS, RNPS);
end support;
create or replace package body support as
FUNCTION hextodec(a IN VARCHAR2) RETURN NUMBER IS
x NUMBER := 0;
y NUMBER;
z VARCHAR2(1);
BEGIN
IF length(a) > 8 THEN
RAISE invalid_number;
END IF;
FOR i IN 1..length(a) LOOP
z := upper(substr(a,i,1));
IF z = 'A' THEN
y := 10;
ELSIF z = 'B' THEN
y := 11;
ELSIF z = 'C' THEN
y := 12;
ELSIF z = 'D' THEN
y := 13;
ELSIF z = 'E' THEN
y := 14;
ELSIF z = 'F' THEN
y := 15;
ELSE
y := to_number(z,9);
END IF;
x := x * 16;
x := x + y;
END LOOP;
RETURN x;
END hextodec;
FUNCTION dectohex(a IN NUMBER) RETURN VARCHAR2 IS
x VARCHAR2(8) := '';
y VARCHAR2(1);
z NUMBER;
w NUMBER;
BEGIN
IF a > power(2,32) OR a < 0 THEN
RAISE invalid_number;
END IF;
w := a;
WHILE w > 0 LOOP
z := w mod 16;
IF z = 10 THEN
y := 'A';
ELSIF z = 11 THEN
y := 'B';
ELSIF z = 12 THEN
y := 'C';
ELSIF z = 13 THEN
y := 'D';
ELSIF z = 14 THEN
y := 'E';
ELSIF z = 15 THEN
y := 'F';
ELSE
y := to_char(z);
END IF;
w := trunc(w / 16);
x := concat(y,x);
END LOOP;
RETURN x;
END dectohex;
END support;
drop public synonym support;
create public synonym support for system.support;
grant execute on support to public;FYI: The new xf86-video-intel (2.9) has just been released:
http://article.gmane.org/gmane.comp.fre … xorg/40733
According to the release announcement, the new driver fixes the backlight issue with KMS:
* Add support for BACKLIGHT property when using kernel modesetting
(KMS). This allows backlight adjustment with programs such as
"xbacklight -set <percentage>" or "xrandr --set BACKLIGHT <value>". -
I have purchased an iPhone app that requires a 'Unicode Hex Keyboard' on my iMac. I have a 'Unicode Keyboard' in the 'International' preferance pane but there is no 'Unicode Hex Keyboard'. The supplier of the app advises that I must install this hex keyboard. My installation CD informs me that all keyboards are loaded at install time however.
How might I go about installIng this keyboard?
Thanks in advance for your help.I have a 'Unicode Keyboard' in the 'International' preferance pane but there is no 'Unicode Hex Keyboard'.
That must be the right one. It's really not possible for this to be missing from system prefs/international/input menu. The icon has a little U+ on it I think.
It is certainly most unusual for anything to require it. Do they tell you what you are supposed to do with it? -
Setting Unicode Hex Input as default
Hey. I know most of the unicode character codes I use a lot by heart, such as U+2325 (⌥) and U+2318 (⌘). However, It's a pain to click on the input menu, and switch the input method to Unicode Hex Input overtime I open an application. Or worse, forgetting to, then ending up typing some bull like '™£¡•' instead of what I intended. How can I make my SYSTEM-WIDE 'default' or basic input method STAY at Unicode Hex Input? Or for that matter, anything other than U.S. Extended.
It seems to have suddenly fixed itself, after wondering about this for years, after that post. I'm starting to wonder if my Mac reads Apple Discussions...
-
Hi,
How can i convert character into hex string , for example if i have the data as "testing data", how can i get the hex coded output? Ive tried out using first string to number vi and thennumber to hex conversion vi but i get the answer as 0, can u help me in this?
In short my data is " testing1234okokok" , i want a hex coded output which would be something as "AD87BA......."
Please help
From SubhashWhat coercion dots? There are no coercion dots even without the loop:
Message Edited by smercurio_fc on 02-13-2008 03:12 PM
Attachments:
Example_VI.png 1 KB -
Interger to hex conversion ???
Hi
Is there a easy way to make interger (unsigned 32 bit ) to HEX
conversion ??Kristian,
It depends on what you want to do with the hex conversion. To view a
number in hex in a control, right click on the control, select Format &
Precision. As long as the format is set to numeric, you can select
between decimal, hex, octal and binary from the other drop-down list.
If you want to change an unsigned 32-bit number to a hex value to be
written to a file, you can use the String->Format Into String VI. Wire
your U32 into input 1, and set the format string to %4x (which will show
a 4 digit hex value). The output will be a string which contains the
hex value.
Hope that helped.
Mark
In article <[email protected]>,
[email protected] wrote:
>
>
> Hi
>
> Is there a easy way to make interger (unsigned 32 bit ) to H
EX
> conversion ??
>
Sent via Deja.com http://www.deja.com/
Before you buy. -
Problem with EPC URI to Hex conversion
Hi Forum,
I am getting strange EPC URI to hex conversion result in tx:/ain/http_test . Could you please confirm if this result is not expected.
1.URI : urn:autoid:tag:sgtin-96:3.0066800.054321.70
hex is : 30740413C00000D431000000
2.URI: URN:AUTOID:TAG:SGTIN-96:3.0066800.054321.71
hex is: 30740413C00000D431000000
thus is both case HEX is same!!!
i am using EPC_1.24 as active EPC version.
could you please suggest some round about way.
thanks in advance,
regards,
Ashithi,
i think problem is with EPC_1.24. i changed to
EPC_1.27
and it works fine.
regards,
Ashit -
Guys, I look at ASCII table given to me for Czech chars and hex value for character "á" is E1. But when I use rawtohex function to get hex value I get below output.
WHY ?
SQL> select rawtohex('á') from dual;
C3A1
How can I get value E1 ? ThanksMy Oracle version is
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
PL/SQL Release 9.2.0.1.0 - Production
CORE 9.2.0.1.0 Production
TNS for Solaris: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
NLS settings are ---
1* select * from v$nls_parameters
SQL> /
PARAMETER VALUE
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET EE8ISO8859P2
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXF
F AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXF
F AM TZR
NLS_DUAL_CURRENCY $
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
Anything more I need to setup. Btw I dun understand yet very clearly difference between NLS_CHARACTER_SET and NLS_NCHAR_CHARACTERSET -
Unicode MDMP conversion issue with document management table.
Hi,
We are in a process of doing a unicode conversion for our ECC 6.0 MDMP non-unicode system. We have completed the scans and we found close to 14 million words not assigned to the codepages.
Then we checked at the table level which table has the highest number of words. There is one custom table ZQMDOCS which is used to store documents (MS-word) documents those are test procedures for our labs.
If we see the MS-word document in non-unicode we are able to get to the document and just did some dummy assignment and completed the import and on our unicode system if we try to open the document it is opening in a readable format.
So the issue is the data what is being stored in the document is in english but the formating which is done is read as a special character in a unicode system and in SAP it stores raw data.
Please suggest ways to resolve this issue or any possible workarounds for this. This is a very critical table ( 43,000 documents & close to 14 million words not assign to the code page)
Thanks
Junaid.Hi Venkat,
Thanks a lot for your immediate response.
The InfoObject 0DOC_TYPE was without conversion exit by default. but when data coming from R/3 it is converting and sending to BW So that's why i am planning to use conversion exit "AUART" in the info Object.
I checked data in R/3 using RSA3 it is showing sales document type as "OR" and for the same transaction data when i checked in PSA it is showing as "TA".
Could you please let me know if there any other options.
Thanks in advance,
Dara. -
Convert UTF-8 (Unicode) Hex to Hex Byte Sequence while reading file
Hi all,
When java reads a utf-8 character, it does so in hex e.g \x12AB format. How can we read the utf-8 chaacter as a corresponding byte stream (e.g \x0905 is hex for some hindi character (an Indic language) and it's corresponding byte sequence is \xE0\x45\x96).
can the method to read UTF-8 character byte sequence be used to read any other (other than Utf 8, say some proprietary font) character set's byte sequence?First, there's no such thing as a "UTF-8 character". UTF-8 is a character encoding that can be used to encode any character in the Unicode database.
If you want to read the raw bytes, use an InputStream. If you want to read text that's encoded as UTF-8, wrap the InputStream in an InputStreamReader and specify UTF-8 as the encoding. If the text is in some other encoding, specify that instead of UTF-8 when you construct the InputStreamReader. import java.io.*;
public class Test
// DEVANAGARI LETTER A (अ) in UTF-8 encoding (U+0905)
static final byte[] source = { (byte)0xE0, (byte)0xA4, (byte)0x85 };
public static void main(String[] args) throws Exception
// print raw bytes
InputStream is = new ByteArrayInputStream(source);
int read = -1;
while ((read = is.read()) != -1)
System.out.printf("0x%02X ", read);
System.out.println();
is.reset();
// print character as Unicode escape
Reader r = new InputStreamReader(is, "UTF-8");
while ((read = r.read()) != -1)
System.out.printf("\\u%04X ", read);
System.out.println();
r.close();
} Does that answer your question? -
Hello,
From external system we receive XML messages in UTF-8. The data are transfered from XI to SAP WAS by RFC adapter. The communication language is set to 'CS' (Czech). The data are saved into database with no conversion to set code page (1401). The receiving system is not Unicode compatible.
Into database are writen unicode chars (e.g. ř) instead of single chars in Czech alphabet.
Is here any way how to force a XI to make a character conversion ?
Thanks for any feedback.
Marian MorzolPl identify your database characterset
SQL> select * from NLS_DATABASE_PARAMETERS;If the NLS_CHARACTERSET is WE8ISO8859P1, it is not capable of storing the Euro symbol (pl do a google search to find various references).
To store the Euro symbol, you will most likely need to change the database characterset to UTF8 - pl see the MOS Docs mentioned in this thread for details - Adding Greek & German language to R12
HTH
Srini -
Hex conversion problem... Please help
Hi all,
I need to convert a hex character representing a UTF-16 character to a hex string representing a UTF-8 character
i.e
String input ="0x0630"; //ARABIC LETTER THAL (UTF-16)
I want the output to be a hex representation of the same charcter in UTF-8.
Does anyone know the java code to do this?As BIJ001 already implied: There are no "UTF-8 characters" and "UTF-16 characters". There are Unicode characters and their respective UTF-8 and UTF-16 encodings.
For example:
"ذ" is the arabic Letter Thal. Its name in the Unicode standard is ARABIC LETTER THAL. Its is the Unicode codepoint (decimal) 1584. This is often written as U+0630 (note that this number is hexadecimal).
The UTF-16 encoding of this letter is the 16bit word 0x0630 (the UTF-16 encoding of most common characters is identical to its codepoint, but that's not always the case!).
The UTF-8 encoding of this letter are the two 8bit words 0xD8 0xB0.
If you have the String "0x0630", then you can split the hexadecimal number from the String, parse it, interpret it as a char, and create a String from it. Then call getBytes("UTF-8") on it and you'll have a byte array containing the UTF-8 encoding of that character.
[_The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)_|http://www.joelonsoftware.com/articles/Unicode.html] is a nice explanation as well. -
Hi Friend,
I am working in UNICODE project,i need one help,
I have one error .
Actually, im using one structure(Z0028) and passing values to internal table.
At that time i shows one error.
Actually,this error is due to type conversion problem.
In that structure,i ve one packed datatype ,so, if i select
unicode check it shows error.
I will sent example prg and error also.
Please give some solution to slove.
REPORT YPRG1 .
TABLES: Z0028.
DATA:I_Z0028 TYPE Z0028 OCCURS 0 WITH HEADER LINE .
SELECT * FROM Z0028 INTO TABLE I_Z0028 .
IF SY-SUBRC <> 0 .
WRITE:/ ' NO DATA'.
ENDIF.
LOOP AT I_Z0028.
WRITE:/ I_Z0028.
ENDLOOP.
Regards,
Kalidas.THi,
Display fields
do like this..
REPORT YPRG1 .
TABLES: Z0028.
DATA:I_Z0028 TYPE Z0028 OCCURS 0 WITH HEADER LINE .
SELECT * FROM Z0028 INTO TABLE I_Z0028 .
IF SY-SUBRC 0 .
WRITE:/ ' NO DATA'.
ENDIF.
LOOP AT I_Z0028.
WRITE:/ I_Z0028-field1,
I_Z0028-field2
I_Z0028-field3.
ENDLOOP.
Regards,
Prashant -
Hi there,
I have an hex variable that I want to move to a Char variable.
DATA: x_var(255) type X,
c_var(255).
MOVE x_var to c_var.
I normally used the command MOVE, but my application needs to be unicode compliant and I receive a warning saying that those "variables are not mutually convertible in a Unicode program".
I have tried the STPU1_HEX_TO_CHAR but it expects a C type variable as input so it does not work
Actually, my c_var variable is the header of a table I have declared as RAW, in case it may give some additional hints
Thanks for your supportHi,
It depends on how you use the type X variable in your Program.
The FM mentioned by RAVI are perfect.
But before using them you need to take two variables of type STRING and XSTRING and proceed because the specifed FM do not accept field types of X and C as parameters.
Example: DATA: x_var1 type xstring,
c_var1 type string.
x_var1 = x_var.
call function module pass x_var1 and store result in c_var1.
c_var = c_var1.
Thanks.
Hope this helps you. -
Unicode test conversion - skip some steps?
Hi all,
We will be upgrading our system from R/3 4.7x200 to ERP2005, and we have recently successfully upgraded our sandbox R/3 4.7x200 system to ERP2005, all pretty much without too much of a hassle. Now we are planning to do a unicode conversion on the same sandbox system, to get some idea about the runtime of such a conversion. The problem is that we are short on time, and I wonder what the effects will be if I skip some of the steps that should be done before we begin with the actual conversion phase (R3load). I have done some of the pre-conversion steps, but not all, and I wonder if there are some that I absolutely MUST do in order to get through the actual conversion?
In the end, we are not looking for a functioning system after this test conversion, we are only interested in the runtime and downtime findings.
Regards,
ThomasHi,
You cannot skip same conversion step.
the good ideas is to use the released method by SAP to do upgrade/conversion at the same time. this will save you time.
check OSS note
Note 928729 - Combined Upgrade & Unicode Conversion FAQ
Good Luck
Maybe you are looking for
-
I have 1 TB hard Drive (Toshiba DT01ACA100), which replaces a failed HD. I was able to install/restore my back-up of Win 7 to this HD, it runs fine. Problem: The Win 7 installation was an upgrade from Vista on the old hard drive. I'm running a H
-
In Printers and Scanners, how can I change the order of the listed printers?
I have 3 different printers, and they all work fine. I would like to move my "default printer" to the top of the listed printers. How do I do that?
-
I currently have about 40 or more bands in My Alerts in iTunes. I used to get all kinds of email alerts and recently I realized I hadn't received any in months. I look in iTunes, and A.F.I., Red Jumpsuit Aparatus, and Bullet for My Valentine, who are
-
WebLogic does not validate minOccurs="1" in webservices
Hello, My WebService is deployed on WebLogic 10.3.3. WSDL/XSD describes input parameter number as mandatory: <xs:element minOccurs="1" maxOccurs="1" name="number" type="xs:int"/> MinOccurs="1" means that XML message must contain <number> tag, isn't i
-
Adding a gutter AFTER document is completed
Just finished laying out a 90 page book. Not sure how 'gutters' work. I find the 'Defining Columns' section in the Help a bit confusing. Could somebody perhaps explain in simpler terms how I install a universal 'gutter' to my entire document (with fa