Problem in converting the unicode to local language
Hi all,
i am trying to convert unicode char to my local language and print it on label but i am not getting the proper output.
the code is given below
package test;
import java.util.*;
import java.awt.*;
public class KanProp extends Frame{
Locale lcl;
ResourceBundle resbdl;
Label lbl;
public KanProp(){
setLayout(null);
setSize(400,400);
lcl =new Locale("kn","IN");
resbdl=ResourceBundle.getBundle("LocalStrings_kn",lcl);
String str=resbdl.getString("Name");
lbl=new Label();
lbl.setFont(new Font("JanaKannada",Font.BOLD,24));
lbl.setBounds(0,100,100,20);
lbl.setText(str);
add(lbl);
setVisible(true);
static public void main(String[] args) {
new KanProp();
} // main
} // classand i am reading a key (ie Name) from the .properties file
can any one please give me the solution?
1. Square box means font does not have a glyph to render your char, or
2. Label is not a lightweight component and may strongly depend on OS - it may result in problems with changing font or using non-OS native characters. Try move to Swing and use JLabel.
3. Try to hardcode unicode text in your source - use editor which supports UTF-8 format and add -encoding UTF-8 in javac command line. This will show if there is any problem with reading resource.
Similar Messages
-
I want to convert the day into THAI language
Hi All,
I write a simple query using date conversion for THAI language. But the NLS_CALENDAR does not convert the DAY to Thai language but month and year shows in THAI only
Please give the date format for THAI language.
Query
select
DECODE (:p_language_id,
'th', TO_CHAR (sysdate,
'DAY MONTH YYYY',
'NLS_CALENDAR=''THAI BUDDHA'''
TO_CHAR (sysdate, 'Day MONTHYYYY') ) dates from dual
Output:
FRIDAY สิงหาคม 2556Try this
alter session set nls_language = 'THAI';
select to_char (sysdate,'DAY MONTH YYYY')
from dual;
NLS_LANGUAGE
Edit.. Perhaps NLS_DATE_LANGUAGE is much suited for your requirement. Check Hoek's solution.
Message was edited by: Karthick_Arp -
Hello, what I have to access to convert the keyboard in swedish language
Hello, what I have to access to convert the keyboard in swedish language
Many thanks for helping me outOpen System Preferences > Language and Text > Input Methods and mark Swedish
-
How do I convert the unicode into an int?
I have to take a large integer from user and put each digit into an array. To take the large number I use .nextLine() so that I would be stored as a string. Then I put each digit into an array of type int, and I use implicit type casting to convert each character to an int. The problem is that now the array contains the unicode for the number, how do I get the actual number?
I know this is kind of silly not to use bigInteger but that's part of the assignment.
better yet, the array mas as well be of bytes since no digits Unicode goes above 57
Edited by: bean-planet on Oct 31, 2008 1:12 PMSo your character is '1' and when you cast that to an int you get something like 49? And you want 1 instead? If that's the case then don't cast, use Character.getNumericValue('1') instead. But read the documentation for the method so you don't get surprised at what Character.getNumericValue("L") returns, for example.
-
How to get the date in local language
Hi,
I want display "Date" in Local language. Written code as below to display date in my RTF Template:
<?format-date:xdoxslt:sysdate_as_xsdformat();'dd'?><?' '?><?xdoxslt:month_name(substring(xdoxslt:sysdate(),3,2), 0, $_XDOLOCALE)?><?' '?><?format-date:xdoxslt:sysdate_as_xsdformat();'yyyy'?>
Output showing in my RTF template as "26 May 2011". which is correct for englilsh.
want to display same format in Local languge for example in Germany :
26 mai 2011
To get the local language format tried 1) by Putting "DEU" instead of "$_XDOLOCALE" 2. Tried by declaring a variable with value as "DEU"
But it two cases it showing in english format not in Germany Language. Please give me idea how to get date in local language.
Thanks
-Chakri..Dont think you have anyway to tell the target language for a single text retrieval. You can obviously set the locale of the user but that will change language of other texts also. If you always want to show some predefined text in English then better you dont keep the those texts at all in the translated files. Or you keep the English text in all the files - so that everytime English only gets displayed. But if your case is a selective one - i.e. you want to show English text to only German users but spanish to Spanish and French to French then I dont have any answer how to achieve the same.
Regards,
Shubhadip -
FM for converting the Numbers into Ukraine Language
Hi All,
Thank You very much in advance..
I have a requirement where I need to convert the Numbers to Ukraine Words...
I have used the FM SPELL_AMOUNT for which I have passed the Language Parameter as 'U' (U refers Ukraine) but I am getting the Error saying that no entry FI in T015Z table....
Do I need to maintaine the entries in table T015Z FOR UKRAINE language as well.. or is there any other process for this requirement.
Can you please help me on this.
Thanks and Regards,
K.Krishna Chaitanya.answered
-
Problem in converting the String to Date with time zone GMT
Hi,
When I tried to convert the string 12/05/2009 to Date, the time zone is set to BST.On the other hand, for the date 12/12/2009, the time zone is set to GMT. What should I do to get the time zone as GMT all the time.?
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
String dateString = "12/05/2009";
System.out.println(myDate.toString());I think you are all missing the point. java.util.Date objects always alway always store the date as the number of milliseconds since 1/1/1970 UTC so the only TimeZone they have its the implicit UTC. When you use the Date.toString() method the toString() method gets the default time zone from your environment and formats the data accordingly. This means that the same Date object will, by default, produce a different result for France and Australia and the US.
So, if you have the date "12/5/2009" as a String then to convert it to a java.util.Date you must specify what TimeZone is implied. If it is your system time zone then you can just create a SimpleDateFormat object with the correct format and then use the parse() method to create the java.util.Date object and this will automatically be converted to UTC. If the date String represents some other time zone then you must explicitly set the time zone of the SimpleDateFormat object before parsing the string.
The same approach applies when converting a java.util.Date object to a String. If you want anything other than your system time zone then you must explicitly tell the SimpleDateFormat what time zone you want the result formatted for. -
Problem in converting the date format in Second's place
I am developing an application using OAF in JDeveloper.
I have to pass the current date from my page to a quary to filter the data.
I used the following:
String PresentDate=this.getOADBTransaction().getCurrentDBDate().toString();
However it is sending a date like '2011-03-22 17:04:14.0'. Here if you see the seconds place, it has a fraction as well.
I need to convert it by using TO_DATE(PresentDate, 'YYYY-MM-DD HH24:MI:SS')
But because of the fraction in Seconds place, it gives an error.
Can anyone help me to solve this problem?
Thanks & Regards
HawkerHawker,
Instead of that use..
//Calling dateValue( ) does not include time.
long sysdate = transaction.getCurrentDBDate().dateValue();
Regards,
Gyan -
Buying from US App store but getting the App in local language
Good day,
I am a US app store buyer but when I downloaded "Pages" this morning, I got in Italian (the coutry I live in). How can I get the App in English? It is anyoing since all my papers are in english and now its telling me i'm mispelling my words.
I tried to change the language to english but only the menu changed, the app is still in Italian.
ThanksIn Pages the spell check language is changed in Inspector > Text > More > Language
-
Problem in converting the spool to PDF.
Hi Experts,
By useing the prg RSTXPDFT4 I can able to download the pdf file.
but after that the pdf is not opening and showing the error as below
"There was an error opening this document.This file cannot be opened because it has no page"
Can anybody suggest for the above issue
Thanks &Regards
SanujeetHi
Just cross verify if in SP02, for your spool request can you open and see the print preview of the print out by click on the sap Script type.
Check if the form is assigned to the message type.Check print preview of PO while creating PO
Thanks & regards,
kiran -
Script convert to local language
Hi All,
I am trying to convert the FORM to local language.
My form is in 'EN' original lang. While i was trying to convert to Japaneese language SE71>Utilities-> convet original language--->EN to JA.
I am getting error message that 'Form does not exists in language JA'.
Please suggest me to move further.
Thanks in advance.
Deepak.
Message was edited by:
KDeepakHI
check with the following options. Hope one of them helps...
Go to Transaction SE76 and mention the form name you to convert Sorce language will be DE by default so mention the language you want to change.For tht go to target lang option and change in the language you require and say change or create and activate
or..
Goto SE72, Create a new script with the Target Language ( say JA ).
Click STYLE -> Copy From ... Provide the name of the script and language ( Say EN) from which you want to copy.
Activate it.
or
Hi,
also use SCC1 transaction to transport scripts
from client to another client
RSTXTRAN to assign standard text to request
regards,
dinesh -
Hi,
I have a strange problem connecting one of the office laptops (Macbook Pro 10.7) to the disk in the Apple Time Capsule. It's just one laptop that has this problem and the other 3 no problems at all and they all run OS X 10.7 Lion, I can access the Time Capsule disk over WAN on all machines but locally on the problem machine i get this message "There was a problem connecting to the server "myserver.local" this file is available on your computer. Access the files and volumes locally." Now from this message it sounds like the problem laptop thinks the network drive (Time Capsule) is the same as it's self in the way of name or address however they clearly have different IP addresses locally.
Any ideas on this would be apreciated as I can only think a clean install but don't want to do this if not necessary.
Thanks
JarrahI think I gave you some bad info in the above, where i enterered the text "myserver.local" & "example.local" this was the host name of the server (Time Capsule) so not local on the computer.
No i didn't try your method, I'll give it a go - I thought the folder option was for local files and not on a server ? -
Errors in PDF converter for Unicode systems
Hello experts,
I have some problems with the PDF conversion in a Unicode system.
I have to convert a smartform to PDF using CONVERT_OTF. I have implemented SAP notes 812821 and 999712.
The problem is that the special characters(diacritics, language specific characters) are overlapped in the generated PDF document. Does anyone knows what is the problem? I don't know what to do anymore...Hi,
Try Below code
*& Report ZTEST_NREDDY1
REPORT ztest_nreddy1 NO STANDARD PAGE HEADING.
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CONSTANTS c_formname TYPE tdsfname VALUE 'ZTEST'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
*st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
.................GET SMARTFORM FUNCTION MODULE NAME.................
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
...........................CALL SMARTFORM............................
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_job_output_options
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
.........................CONVERT TO OTF TO PDF.......................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
jana -
Hi,
i am facing a strange problem while converting the book file to pdf...
Error message:
%%[ ProductName: Distiller ]%%
%%[Page: 1]%%
%%[Page: 2]%%
%%[ Error: ioerror; OffendingCommand: readstring ]%%
Stack:
(====;;;;;;::::9998877755554444222222222-\)&# ...)
-file-
-mark-
-save-
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%
I think its with the encapsulated post script files I use in the book.
please help me to resolve this issue...
Thanks...PostScript language level 2 dates back to 1990. PostScript language level 3 was announced in 1996 with first devices shipping in 1997. Adobe Acrobat Distiller is effectively an Adobe PostScript 3 device as of Acrobat 4.0. At Adobe, we know of no problems associated with processing of properly generated PostScript language level 3 files by Distiller.
In terms of what may appear in an EPS file, the major areas of difference would be in use of smooth-shaded gradients in language level 3 as opposed to adjacent similar polygons or images to represent gradients in language level 2.
Ironically, changing the settings of the Adobe PDF PostScript printer driver instance for PostScript language level (the Distiller itself has no such setting) does
not affect the placed EPS (or EPS derived from placed PDF) in your FrameMaker document. The PostScript text in the EPS is simply passed through the driver unchanged, regardless of the driver's PostScript language level setting, to the Distiller. The setting you changed affected only the PostScript generated from non-EPS components of your FrameMaker document.
I cannot rationally explain the symptoms you experienced and why the driver setting change you made resolved the symptoms without looking at your files and knowing exactly how they were generated. It is possible that the problem has nothing to do whatsoever with your EPS files! :-)
- Dov -
Problem in converting reports to PDF format - bug
dear all,
There is a problem in converting the reports in PDF format.
The situation is that if we use the tool bar icon in SAP B1 to get the reports in PDF format, there are printing errors. The output PDF file does not contain the exact data that is in the report, the values are getting interchanged and mismatched.
But if we do the same using the print in the PDF option in choose from printers window as we do regular pringting, the document is printed properly.
what may be the cause for this bug like thing. How can we solve it??
please help me..
thanks and regards,
Yeshwanth PrakashCheck this SAP Note: 1089388 Incorrect value in exported PDF when Concat function is used
[https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E¬e_numm=1089388]
Maybe you are looking for
-
I want to completely delete a email account from my iMac.
It seems that the details are still there in the background and when I reset the account it defaults to some of the previous settings
-
Hi Experts, I have a standard sap transaction. I want to debug the Object status, but I need information on this field. What is it exactly and where is it coming from. Is it coming from somewhere on the screen of the initial transaction?
-
Closing an order by generating proforma invoice
Hi, is it possible to close an order by generation of proforma invoice? (for cases in which order is opened only in order to generate a proforma invoice for customs purposes only) if so how - with what type of order, etc
-
Hi, When I go to update my apps it asks me to sign in, however the login is wrong, it comes up with [email protected] when it should be [email protected] (note the email bit on the address is different). Then it keeps saying "your password was entere
-
Reg. Custom MATMAS IDOC
Hi Gurus, I created one custom idoc based on matmas. I want to raise that idoc whenever material created or changed (Changes only send to thirdparty). How can we do this. Thanks & Regards Krishna