| |
| Gut zu wissen: Hilfreiche Tipps und Tricks aus der Praxis prägnant, und auf den Punkt gebracht für PTC CREO |
Autor
|
Thema: jlink: Excuse me, I only can write english. (1574 mal gelesen)
|
diego.peinado Mitglied
Beiträge: 4 Registriert: 01.02.2008
|
erstellt am: 01. Feb. 2008 14:24 <-- editieren / zitieren --> Unities abgeben:
Hi, I have a problem when using non english characters in parameters. As german has also non-english characters I hope you can help me. When reading the value of a string parameter in which there are non english characters, for instance: diseño de camión, I have an error: Invalid wide string: failed to convert to multibyte FATAL MULTI-THREADING ERROR DETECTED! DESCRIPTION: Thread can't lock non-recursive mutex twice or unlock non-locked mutex APPLICATION TERMINATED... This occurs when pval.GetStringValue(); and I assure that this is a String parameterValue. If I suppress the non english characters then everything goes smooth. I've read something of protoolkit having functions that converts from string to wide strings and viceversa, but I do not know if it is possible in jlink, or if there is another way to handle that. Thanks in advance and best regards,
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
fly Mitglied Leitender Angestellter
Beiträge: 176 Registriert: 02.08.2004 WF3 M230 Windchill 9.1 FCS R630 WinXP SP3
|
erstellt am: 01. Feb. 2008 15:41 <-- editieren / zitieren --> Unities abgeben: Nur für diego.peinado
|
Michael 18111968 Moderator F&E & CAD
Beiträge: 4893 Registriert: 25.07.2002 Wildfire 4 M220 (+SUT 2012) PDMLink 9.1 M050 NVIDIA Quadro FX 1700 Intel DualCore E8400 / 8GB WinXP 64 Prof. SP2
|
erstellt am: 01. Feb. 2008 15:41 <-- editieren / zitieren --> Unities abgeben: Nur für diego.peinado
Hi there! CAD.de normally is a german-spoken page, so I will try to translate your text for the non-english-speeking users of CAD.de, so that anybody understands your Problem. Hallo liebes Forum, hier mein Versuch einer freien deutschen Übersetzung, vielleicht gibt es ein paar nicht-englisch-sprachige Toolkit-Könner, die antworten möchten: Zitat: Hi, ich habe ein Problem mit Sonderzeichen in den Parametern. Da die deutsche Schrift auch Sonderzeichen hat, hoffe ich, Sie können mir helfen. Beim Lesen des Wertes eines String-Parameters mit Sonderzeichen, zum Beispiel: "diseño de camión" bekomme ich einen Fehler: "Invalid wide string: failed to convert to multibyte FATAL MULTI-THREADING ERROR DETECTED! DESCRIPTION: Thread can't lock non-recursive mutex twice or unlock non-locked mutex APPLICATION TERMINATED..." Dies tritt bei "pval.GetStringValue ();" auf, obwohl es sich um einen String-Parameter handelt. Ohne Sonderzeichen geht alles glatt. Ich habe etwas von protoolkit-Funktionen gehört, die String nach WideString konvertieren und umgekehrt, aber ich weiß nicht, ob das in Jlink möglich ist, oder ob es eine andere Möglichkeit gibt. Vielen Dank im Voraus und besten Grüßen, diego.peinado
Alle CAD.de-User, die es besser übersetzen könnten mögen mir verzeihen... ------------------ CAD.DE macht Spaß! Wichtige Links für noch mehr Spaß: Richtig Fragen - Nettiquette - Suchfunktion - System-Info - Unities - Stammtisch Guten Morgen - und falls wir uns nicht mehr sehen - guten Nachmittag, guten Abend und gute Nacht! (Truman Burbank in "Die Truman-Show") Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
anagl Ehrenmitglied V.I.P. h.c.
Beiträge: 4566 Registriert: 28.05.2001 CREO2 M140 PDMLink 10.2 M020 HW diverse Das Schreiben bei CAD.de ist freiwillig und kein Muss !!!!!
|
erstellt am: 01. Feb. 2008 17:59 <-- editieren / zitieren --> Unities abgeben: Nur für diego.peinado
Which version do you use ? I think, where are problems in WF2 with multinational characters or special character (Diameter Symbol) In WF 4 all Text should changed to unicode. I havenn't tested in which way WF3 works. ------------------ Servus Alois Keine Mouseover-Werbung zwischen den Zeilen!!!! Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
matfoltas Mitglied MB Konstrukteur
Beiträge: 55 Registriert: 02.01.2004 Elitebook HP, Windows XP pro SP3, Cocreate Modeling 16
|
erstellt am: 02. Feb. 2008 02:06 <-- editieren / zitieren --> Unities abgeben: Nur für diego.peinado
Hi, We use this and others jlink functions with no problems, string parameters in portuguese, which also has special characters. Works with WF2 and WF3. As mentioned above, check your locale. Greetings, Matias ------------------ Die Uhren drehen hier anders... Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
diego.peinado Mitglied
Beiträge: 4 Registriert: 01.02.2008
|
erstellt am: 04. Feb. 2008 10:37 <-- editieren / zitieren --> Unities abgeben:
|
bilch Mitglied
Beiträge: 78 Registriert: 01.02.2005 Wolfenbüttel
|
erstellt am: 04. Feb. 2008 12:01 <-- editieren / zitieren --> Unities abgeben: Nur für diego.peinado
Hi, please try this with your prefered language:
Code:
set PRO_JAVA_COMMAND=????\java -Duser.language=en -Duser.region=US -Duser.country=US
Code:
2006-05-24 08:27:52,797 INFOR [] currentLocale.getCountry() = US 2006-05-24 08:27:52,797 INFOR [] currentLocale.getDisplayCountry() = United States 2006-05-24 08:27:52,797 INFOR [] currentLocale.getDisplayLanguage() = English 2006-05-24 08:27:52,797 INFOR [] currentLocale.getDisplayName() = English (United States) 2006-05-24 08:27:52,797 INFOR [] currentLocale.getDisplayVariant() = 2006-05-24 08:27:52,797 INFOR [] currentLocale.getISO3Country() = USA 2006-05-24 08:27:52,813 INFOR [] currentLocale.getISO3Language() = eng 2006-05-24 08:27:52,813 INFOR [] currentLocale.getLanguage() = en 2006-05-24 08:27:52,813 INFOR [] currentLocale.getVariant() = 2006-05-24 08:27:52,813 INFOR [] System.getProperty("user.country") = US
HTH Gruss ------------------ [Diese Nachricht wurde von bilch am 04. Feb. 2008 editiert.] Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
diego.peinado Mitglied
Beiträge: 4 Registriert: 01.02.2008
|
erstellt am: 04. Feb. 2008 12:43 <-- editieren / zitieren --> Unities abgeben:
Thanks again. When I did Locale def = Locale.getDefault(); JOptionPane.showMessageDialog(null, "locale coutnry: "+ def.getCountry()+"\n"+ def.getDisplayCountry()+"\n"+ def.getDisplayLanguage()+"\n"+ def.getDisplayName()+"\n"+ def.getLanguage()); I had country = ES, but language = en (english) I did Locale otro = new Locale("es","ES"); Locale.setDefault(otro); So I had country = ES and language = es But I still have the same problem. When accesing a string parameter value with spanish characters I had Invalid wide string: failed to convert to multibyte FATAL MULTI-THREADING ERROR DETECTED! DESCRIPTION: Thread can't lock non-recursive mutex twice or unlock non-locked mutex APPLICATION TERMINATED... Java Result: 1 Is it possible that it has to do with toolkit internationalization ? How can you use portuguese characters without problems, Thanks in advance and best regards, Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
matfoltas Mitglied MB Konstrukteur
Beiträge: 55 Registriert: 02.01.2004 Elitebook HP, Windows XP pro SP3, Cocreate Modeling 16
|
erstellt am: 05. Feb. 2008 13:02 <-- editieren / zitieren --> Unities abgeben: Nur für diego.peinado
Hi Diego, Sorry for the delay, it's carnaval here, almost forbidden to work... Humm, now its time for you to tell us a bit more about your system. This Forum expects to know what hardware you use as well as the version (inclusive datecode) of pro/E you're running. Don´t forget the operating system and the exact version of java you're using. Generally, java handles unicode (widestring) characters seamlessly, can't remember having seen something like that in java, I think it's more a c or c++ problem, where such conversion take place. I use windows xp in portuguese and pro/E in english, as there is no version in portuguese. Never had problems with special characters, picture attached (with diseño de camión). Have you tested the ParamEditor application which comes with the pro/E installation? Same problems here? If you will, post some of your code here for us to test. Regards, Matias ------------------ Die Uhren drehen hier anders... Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
diego.peinado Mitglied
Beiträge: 4 Registriert: 01.02.2008
|
erstellt am: 05. Feb. 2008 13:30 <-- editieren / zitieren --> Unities abgeben:
Ok, I have the application working. The problem was that I have two versions. One Async because I can easily change, compile, and rerun; and the other synchrounous. With the Async version I have always this problem. With the sync now it's working. The problem was that I have in control panel the localization for spain but changed the decimal point (I prefer point instead of comma). I use the spanish localization and it's working in Synchronous mode. Well I don't know why in async do not work (I used jlink_java_command C:\Archivos de programa\Java\jdk1.6.0_02\bin\java.exe -Duser.language=es ... for localizacion problems) but it still do not work. Never mind, the working version is the Synchronous one (it goes 10 times faster). Thanks really a lot for your help. Bye
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |