Unicode: Is it Possible to convert a string, or text, for Output?
Can you take a string (or text) in Unicode (4 bytes each character), and by using its string (or text), as input it to a Function Module, or Method, have the string's hex values converted into the old non-unicode value (2 bytes each character) to send to an external system?
I wish it were this easy, but am finding out it is not. Seems like whenever I run a process to convert a field (4 bytes) in the new unicode system, to old non-unicode (2 bytes each), and move it back into a field in the unicode system, it automatically converts it back to 4 bytes automatically?
It is causing issues on the external tergat system that is not using unicode.
Thank-You.
Not that I know of. But you could convert your text to RAW or XSTRING, and send that value to the external system.
Jan
Similar Messages
-
Is it possible to convert from string to variant?
Hi!
I would like to convert a text string to variant. I'm doing this because I would like to merge a couple of signals and then save all the signals in a lvm-file. Could someone please explain how to convert from text to variant, is it possible?
Thanks in advance!
Regards,
Mattias
Attachments:
Merge signals.JPG 27 KBWhat you are attempting to do is possible, but might not give you the results you expect. All you need to do is convert your string to an array of U8s using the String to Byte Array conversion primitive. In the file, you will get a single character per line of the file expressed as the ASCII code. When you read it, convert to U8s, then use Byte Array to String to get your string back.
You may also want to read up on LVM files. There are several places to put strings that work a little better than this.
This account is no longer active. Contact ShadesOfGray for current posts and information. -
Is it possible to convert a string (eg. 2140) into time in flex?
Hi.
I have a form where the user inputs the time into a text input...I want to take that and convert it to time/date...is that possible?Hi,
Did you mean convert "2140" to "21:40"? You can write your own parser/formatter, that takes the string, analyzes it, and puts a colon ":" in appropriate place. Or alternatively you can check this post http://scottrbailey.wordpress.com/2009/05/28/parsing-dates-flex-as3/ . Try the parseTime function, it seems to do exactly what you want.
Regards,
Adrian Wiecek -
Convert from String to Date for storing in SQL Server 2000
Hi,
I've accepted some values from a user using a form in HTML.Now using Servlets I transfer the value to my java code .
I want to know how can I convert a DATE accepted from the user thats presently in "String" format to the "datetime" format for SQL Server2000.
Please guide me with some steps and I shall be grateful.
ThanksThe java.text.SImpleDateFormat class is most probably of use.
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
String enteredDate = "25/12/2006";
java.util.Date utilDate = sdf.parse(enteredDate);
java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());You can then use the java.sql.Date with the "setDate()" method of a prepared statement. This method would be database independant, as you are setting an actual date, not depending on a specific format on the database end. -
We want to include some of our layouts as case studies on our website. The idea is that a preview image will, on rollover, produce a larger version of the image/layout as part of a case study - full size image dimensions from, say, 400px x 300px. However, using the export command (CS3) produces poor quality text even at 'Maximum' at 300ppi - to say nothing of the unacceptable file size! Site to be constructed in Flash. Any ideas?? Thanks. Alex
My apologies if I sounded harsh. I didn't mean to be.
I just wish the world would recognize that there is no such thing as "screen resolution" or "web resolution" in the sense that 72 ppi is an "appropriate" number. When you "save for the web" in Photoshop you are doing any number of things, including downsampling to reduce the number of pixels in the image, and adding compression to make the files smaller still so they will load faster, both of which can make your image useless for print purposes.
That the default might be to save at 72 ppi is irrelevant -- it's just a convenient number. If you open your freshly saved image in Photoshop and go to the Image Size dialog, uncheck "resample image" and change the resolution, you'll see that the file size and pixel counts remain unchanged (along with the screen dispaly in Photoshop), because the image data is unchanged. All you have done is say "If you choose to print this image at 100% size, it should be x units wide and y units tall, and should have (whatever the the value you used) pixels per unit." You can freely scale this, if you wish, knowing the "effective" resolution varies in reverse proportion to the scaling factor.
If you put this image on the web, it will have whatever pixels were saved, regardless of how large or small (in print) those pixels would be rendered.
Peter -
Bonjour,
Je voudrais savoir pourquoi n'est il pas possible de convertir une musique en une sonnerie pour alarme de réveil de plus de 30-40 secondes? Et si cela est remédiable, merci de me l'indiquer.
A bientôt.Google translate:
I want to know why is it not possible to convert music into a ringtone for the alarm clock more than 30-40 seconds? And if it is remediable, thank you stated.
Just Google for:
convert mp3 to iphone ringtone. -
How to convert XML message in text format by using HTTPS-Receiver adapter
Is it possible to convert XML message in text format when we use HTTPS as the receiver adapter?
If yes, how?
Thanks!
MrudulaHi Mrudula,
As far as i know there are no content conversion methodology for HTTPS as the recevier adapter.
Also you can read through these links to confirm the same:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/content.htm
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/sap_xi/sapximst30.htm
SAP NetWeaver - XML Communication Interface (CA-XML) [original link is broken]
Regards,
abhy
note: reward the helpful. -
Is it needed to convert the values frm text field to numeric for sql server
hi all,
i'm using tomvat4.0,back end sql server 200.
when i insert the values in to the table it is giving an exception sayin "Error in converting varchar to numeric"
is it necessary to convert those strings from text fields into int before passing them to the sql query..
i think it is not necessary for oracle..but not sure with sql server..
pls help me
cheers
chanduyap, every thing is fine...
n i got the solution...when the text field is left blank....the requst.getParameter returns [coe]""(null)
wen the database is lookin for a numeric it is giving null...which is not acceptable...
so inserted this code...
if(request.getParameter("...").equals("")) {
//assign zero to a variable then insert that variable....
}thanx for the responses
cheers
May the solutions to one's problem pop up in one's mind itself
chandu -
Converting Hex string to unicode
I am reading in a hex representation of Unicode characters as a string.(for example: 004100200042)
I want to convert the string from hex to unicode, and write the corresponding characters to a file. The output should look like follow:
A B (0041 = Capital A, 0020 = space, 0042 = Capital B)
Could you please assist?Problem solved, no need to look into it. Thank you
-
It is possible to convert String to XMLDocument?
I use XML SQL Utility to generate an XML document from the results of a query. I want to apply XSLT on this xml document.
The problem is that XSU generates the document in String format. Or I use XSLProcessor.processXSL, and this method needs to parameters stylesheet and XMLDocument.
So, my question is :It is possible to convert String to XMLDocument?
Thanks.<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
Use getXMLDOM() instead of getXMLString() on the OracleXMLQuery object. This returns you a DOM representation instead of a string, avoiding parsing.<HR></BLOCKQUOTE>
Hi
I'm reading about how " generate an XML document from the results of a query" i exactly want to do this but i need to create the XML file not only generate it. How I "create" the XML file?. Because, I need to manipulate later my XML file.
Thanks for any help.
null -
Is it possible to convert ascii data in binary?
Hi all.
In my one table there is a column which contains ascii value. i want to convert it in binary. It it possible in oracle?
eg field value:1250ÿ it should be 125011111111
kindly tell how to do this.
i have tried this using a simple java program but doesnot work for some ascii values.
thank youI created two functions :
create or replace FUNCTION dec2bin (N IN NUMBER) RETURN VARCHAR2 IS
binval VARCHAR2(64);
N2 NUMBER := N;
BEGIN
WHILE ( N2 > 0 ) LOOP
binval := MOD(N2, 2) || binval;
N2 := TRUNC( N2 / 2 );
END LOOP;
RETURN binval;
END dec2bin;
And other :
create or replace function to_ascii( inSource IN VARCHAR2 )
return varchar2 AS
ResultString varchar2(381); -- 3 * possible length of source
TempNumber number;
begin
for i in 1..length( inSource ) loop
TempNumber := dec2bin ( ascii( substr( inSource,i,1 ) ) );
ResultString := ResultString || trim( to_char(TempNumber,'00000009'));
end loop;
return ResultString;
end;
Now, in sqlplus : (just to show the binary string)
column mybin for 9999999999999999999999999999999999999999
SQL> select to_ascii('g') mybin from dual;
MYBIN
01100111
SQL> select to_ascii('girish') mybin from dual;
MYBIN
011001110110100101110010011010010111001101101000
SQL>Source:http://psoug.org/snippet/Convert-between-Decimal-Binary-Octal-and-Hex_536.htm
http://www.dbforums.com/oracle/974944-converting-string-binary.html
Is this you want or something else ?
Regards
Girish Sharma -
Hi All,
Can you please let me know for any sample code in xslt/java mapping for converting XML string into XML. We use SAP Pi 7.0
My XML string starts like this
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_ReceiverFileStructure <namespace>"><Output><?xml version="1.0" encoding="ISO-8859-9"?><?xml-stylesheet type="text/xsl" href="<xsl>"?><Tarih_Date Tarih="11.09.2014" Date="09/11/2014>
Thanks,
PavithraThanks Praveen. It worked.
However, the xml i have is an extract from a exchange rate URL and it has the reference to a xsl in it as below
<?xml version="1.0" encoding="ISO-8859-9"?><?xml-stylesheet type="text/xsl" href="<ABC.xsl>"?>.
So there is an error in sxmb_moni. Is it possible to remove this. -
Its possible to convert Apple script to Java script
Hi,
Please Help me anyone to do that script.
its possible to convert below mentioned Apple script to Java Script.
Thanks in advance.
Help me......!
-yajiv
Code:
tell me to addImageLabels()
on addImageLabels()
tell application "Adobe InDesign CS5"
set numberAdded to 0
activate
set enable redraw of script preferences to true
set currentFonts to (get name of every font)
if currentFonts does not contain fontname then
display dialog "The font \"" & fontname & "\" is not active on your system." buttons {"Continue anyway", "Cancel"} default button 2
end if
tell document 1
-- get a list of unique page IDs in this document
set allpageids to my getPageIds()
repeat with p from 1 to (length of allpageids)
set pgid to item p of allpageids
-- loop through these, getting a list of unique page item IDs to inspect
tell page id pgid
set pageitems to (get id of every page item)
repeat with i from 1 to (length of pageitems)
set pid to item i of pageitems
tell page item id pid
try
-- certain boxes will fail to yield a content type, whatever
if content type is graphic type then
set c to class
set i to id
-- get the name of the link, i.e. the filename, subject to labelFormat (full name, first six chars, etc.)
set gn to my getImageName(pgid, c, i)
if (gn is not "Empty") and (gn is not "") then
set b to visible bounds
set h to (item 3 of b) - (item 1 of b)
set newtop to (item 1 of b) + (h / 2)
set item 1 of b to newtop
set w to (item 4 of b) - (item 2 of b)
if w < minwidth then
set item 4 of b to ((item 4 of b) + 0.2)
set item 2 of b to ((item 2 of b) - 0.2)
end if
set l to (make new text frame at beginning of page id pgid with properties {visible bounds:b, fill color:fillcolor, contents:gn, label:"imagelabel"})
tell l
tell paragraph 1
set justification to center align
try
set applied font to fontname
end try
set point size to fontsize
set fill color to textcolor
end tell
set inset spacing of text frame preferences to ((insetspacing as string) & " in") as string
fit given frame to content
set numberAdded to numberAdded + 1
end tell
end if
end if
end try
end tell
end repeat
end tell
end repeat -- allpageids
end tell -- document 1
display dialog "Added " & numberAdded & " labels." buttons {okButton} default button 1 giving up after 10 with title scriptName
end tell -- InDesign
end addImageLabels
on getPageIds()
tell application "Adobe InDesign CS5"
tell document 1
tell master spread 1
set masterpageids to (get id of every page)
end tell
set docpageids to (get id of every page)
end tell
end tell
return masterpageids & docpageids
end getPageIds
on getImageName(int1, cla1, int2)
tell application "Adobe InDesign CS5"
tell document 1
tell page id int1
if cla1 is rectangle then
set imagename to (name of item link of graphic 1 of rectangle id int2)
else if cla1 is polygon then
set imagename to (name of item link of graphic 1 of polygon id int2)
else
return "Unknown"
end if
try
if (labelformat is "First six characters") then
return (characters 1 thru 6 of imagename) as string
else if (labelformat is "Base name of linked file") then
set op to offset of "." in imagename
return (characters 1 thru (op - 1)) of imagename as string
else
return imagename
end if
on error
return "Empty"
end try
end tell
end tell
end tell
end getImageNameYajiv:
I realize English is probably not your first language, but you are not really making sense. Perhaps you could use more words and write in more detail.
It seems you already have your script in AppleScript. Why do you need to convert it to JavaScript?
It's going to be inconvenient at best and probably not worth anyone's time.
Just use the AppleScript. -
Converting a String to an integer?
i need to convert a string to an integer..i searched through the site but i didn't find anything...
Is this conversion possible?You didn't look very hard - it's right in the javadocs:
String s = "44";
int x = Integer.parseInt(s);I'll leave the exception handling for you. -
Hi,
I have a problem with an PropertyGrid enum property that uses a type converter.
In general it works, but when I double clicking or using the scoll wheel, an error message appears:
"Property value is not valid"
Details: "Object of type 'System.String' cannot be converted to type 'myCompany.myProject.CC_myCustomProperty."
I noticed that the CommitValue method (in PropertyGridView.cs) tries to convert a string value to a CC_myCustomProperty object.
Here is the code that causes the error (see line 33):
(Using the .net symbols from the PropertyGridView.cs file)
1
internal bool CommitValue(GridEntry ipeCur, object value) {
2
3
Debug.WriteLineIf(CompModSwitches.DebugGridView.TraceVerbose, "PropertyGridView:CommitValue(" + (value==null ? "null" :value.ToString()) + ")");
4
5
int propCount = ipeCur.ChildCount;
6
bool capture = Edit.HookMouseDown;
7
object originalValue = null;
8
9
try {
10
originalValue = ipeCur.PropertyValue;
11
12
catch {
13
// if the getter is failing, we still want to let
14
// the set happen.
15
16
17
try {
18
try {
19
SetFlag(FlagInPropertySet, true);
20
21
//if this propentry is enumerable, then once a value is selected from the editor,
22
//we'll want to close the drop down (like true/false). Otherwise, if we're
23
//working with Anchor for ex., then we should be able to select different values
24
//from the editor, without having it close every time.
25
if (ipeCur != null &&
26
ipeCur.Enumerable) {
27
CloseDropDown();
28
29
30
try {
31
Edit.DisableMouseHook = true;
32
/*** This Step fails because the commit method is trying to convert a string to myCustom objet ***/
33
ipeCur.PropertyValue = value;
34
35
finally {
36
Edit.DisableMouseHook = false;
37
Edit.HookMouseDown = capture;
38
39
40
catch (Exception ex) {
41
SetCommitError(ERROR_THROWN);
42
ShowInvalidMessage(ipeCur.PropertyLabel, value, ex);
43
return false;
44
I'm stuck.
I was wondering is there a way to work around this? Maybe extend the string converter class to accept this?
Thanks in advance,
Eric
Hi,
Thank you for your post! I would suggest posting your question in one of the MS Forums,
MSDN Forums » Windows Forms » Windows Forms General
located here:http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=8&SiteID=1.
Have a great day!
Maybe you are looking for
-
Not able to display data in different columns using Unicode encoding
Hi, Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet. Please let me know how to display data in different colu
-
My i phone doesn't sync properly and i don't know how to fix it
Essentialy when i try to sync my Iphone with Itunes, i get a sync that lasts about 4 seconds and gose through the steps: Waiting for sync to start step 1/4 Prepaireing to sync step 2/4 Determining trackto sync 3/4 Waiting for changes to be applied 4/
-
Where Clause in Logical Table Source
I have a dimension table joined to a fact table in BMM Layter. I would like to apply a filter in the where clause of the dimension table. Does the fact table also require the same exact filter to be applied in the where clause.
-
i have oracle 10g and 9i installed in windows 2003 server. i have tried to uninstalled oracle 9i using OUI but it doesn't work. no errors was show. please advice. thanks
-
Lightroom 3.5 - Catalogue Error
My Lightroom use to work fine but the other day I got an Opening Catalogue...IRCAT something and it won't open anymore. I un-installed the application and deleted and catalogue folder and the re-installed it hoping it will solve the issue. But after