Problems with string codification under unix
Hi people,
I'm trying to insert Latin caracters as � or � in a string, and trying to insert them into an excel page. Everything goes fine, untl those latin caracters are inserted. They are shown as a question mark (?). I tryed using a charset set to UTF-16 and ISO-8859-1, which is the ISO Latin Alphabet No. 1. But it still is shown as '?'.
I think the problem might be in the unix codification.
But have no idea really.
Any help please?
Thanks to everyone for your help.
No, the original post mentioned Excel. That's a Microsoft product so it's unreasonable to expect it to understand ISO-8859 encodings. A Windows encoding would have a better chance of working.
Similar Messages
-
I am new to Java Programming.
I have a line of code that works and does what is supposed to.
faceData.getProfile("Lisa").removeFriend("Curtis");
If I assign the strings to variables such as-
String name = "Lisa";
String fName = "Curtis";
and then plug those into the same line of code, it does not work
faceData.getProfile(name).removeFriend(fName);
What could be causing the problem?
I even added some lines to print out what is stored in the variables to verify that they are what they should be, but for some reason the variables do not work while putting the strings in quotes does. Any ideas?I guarantee that something about your assertions are incorrect. Those variables are either not equal to the values you claim, or something else is going on. But it's not a problem with string variables versus string constants.
Edit: My best guess in lack of a real example from you, is that the strings in question have non-printable characters in them, such as trailing spaces or line feeds. -
Little problem with Strings.
I have an little problem with Strings, i make one comparision like this.
String nombre="Javier";
if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
this before and are equals.
What I do wrong?.
You are actually making your users key in things like
"\026"? Not very user-friendly, I would say. But
assuming that is the best way for you to get your
input, or if it's just you doing the input, the way to
change that 4-character string into the single
character that Java represents by '\026', you would
use a bit of code like this:char encoded =
(char)Integer.parseInt(substring(inputString, 1),
16);
DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :) -
Problem with inifile.fp under Linux
Hello all,
I noticed a problem with inifile.fp under Linux: I can't write the updated
ini file !
hConfigFile = Ini_New(0);
if (Ini_ReadFromFile (hConfigFile, ConfigPath));
Ini_GetInt(hConfigFile, "Client", "ChartsRefreshRate", &ChartsRefreshRate);
Ini_GetInt(hConfigFile, "Client", "ChartsDuration", &ChartsDuration);
.... Change the values ...
Ini_PutInt(hConfigFile, "Client", "ChartsRefreshRate", ChartsRefreshRate);
Ini_PutInt(hConfigFile, "Client", "ChartsDuration", ChartsDuration);
if (0!=(Err=Ini_WriteToFile (hConfigFile, ConfigPath)))
fprintf(stderr, "\nWarning: problem writing %s configuration files: %s",
ConfigPath, GetUILErrorString(Err));
This fails and displays:
Warning: problem writing Config.ini configuration files: File not found
But not only that, it also deletes the ConfigPath file !!!
Which is rather unacceptable !
I see that the inifile.fp I have on the PC (CVI 8.5) is different than the
one I have on the Linux install (cvicc 8.0). Can I copy all the inifile.*
files to Linux or is it more complicated than that ?
Guillaume Dargaud
http://www.gdargaud.net/Hello Luis,
I came here to check if a new version of CVI (cvicc, not the real-time
module) for Linux had come out and, sadly, it appears that's still not the
case...
But I saw your followup to our original discussion.
The ini file has grown tremendously since then, but I think I had the
problem with even the most basic file: simple name (same directory, no
path), but maybe it was on an NFS directory (that's no longer the case).
Also the fact that instead of writting _in_ the file (where permission was
allowed) you wrote to a temp file (that may not have had permission) and
then renamed accordingly...
I'll start a new project soon that will require ini files, so I'll test it
again.
> (I realize it has been a while, but I thought I'd ask anyway, in case you
> still remember this).
> I was investigating this bug today, but so far I haven't been able to
> reproduce it. I tried it in both Windows and Linux, with both a
> writeable location for the test .ini file and a non-writeable location,
> but so far the behavior is as expected. Ini_WriteToFile does return an
> error when the location isn't writeable, but it doesn't delete the file.
> So I was wondering whether this might be related to the specific
> path you were using, or maybe even with the content of the .ini file
> itself. I don't suppose you would remember whether there was anything
> unusual about the path, would you? Also, do you happen to still have this
> .ini file lying around somewhere and wouldn't mind sharing it with me?
> Luis
Guillaume Dargaud
http://www.gdargaud.net/ -
Problem with String to Int conversion
Dear Friends,
Problem with String to Int conversion
I am having a column where most of the values are numeric. Only 4 values are non numeric.
I have replaces those non numeric values to numeric in order to maintain the data type.
CASE Grade.Grade WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade END
This comes the result as down
Grade
_0_
_1_
_10_
_11_
_12_
_13_
_14_
_15_
_16_
_17_
_18_
_19_
_2_
_20_
_21_
_22_
_23_
_24_
_3_
_4_
_5_
_6_
_7_
_8_
_9_
Refresh
Now I want to convert this value to numeric and do some calculation
So I changed the formula as below
cast (CASE Grade.Grade WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade END as INT)
Now I get the following error
View Display Error
_ Odbc driver returned an error (SQLExecDirectW)._
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
_State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtFetch. [nQSError: 17012] Bulk fetch failed. (HY000)_
SQL Issued: SELECT cast ( CASE Grade.Grade WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' ELSE Grade.Grade END as Int) saw0 FROM "Human Capital - Manpower Costing" WHERE LENGTH(CASE Grade.Grade WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN 'E4' THEN '23' ELSE Grade.Grade END) > 0 ORDER BY saw_0_
Refresh
Could anybody help me
Regards
Mustafa
Edited by: Musnet on Jun 29, 2010 5:42 AM
Edited by: Musnet on Jun 29, 2010 6:48 AMDear Kart,
This give me another hint, Yes you are right. There was one row which returns neither blank nor any value.
I have done the code like following and it works fine
Thanks again for your support
Regards
Code: cast (CASE (CASE WHEN Length(Grade.Grade)=0 THEN '--' ELSE Grade.Grade END) WHEN 'E4' THEN '24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' when '--' then '-1' ELSE Grade.Grade END as Int) -
Problem with String in a Vector
I'm making a small hangman game. And I got a problem with putting words in a Vector... This is the code... Can someone tell me what I'm doing wrong?
// First I define it.
Vector Words;
// Then add the words
Vector Words = new Vector();
Words.add(new String("HELLO"));
Words.add(new String("GOOD BYE"));
// When I try to get a string from the Vector I use this.
// The program compiles but when I try to run it I get NullPointerExeption here
W = (String) Words.elementAt(0);Not sure since I cant see all of your code but looks like this might be your problem:
// First I define it.
Vector Words; //<-- here you define a Vector named Words that is null
// Then add the words
Vector Words = new Vector(); //<-- here you define another vector named Words that holds a reference to a new Vector. This is a different reference than the one created above so you should probably remove the "Vector" part from the beginning of this line. Is this a local variable to a method and the one before is a global variable?
//Here you probably access the locally created Words vector which is initialized
Words.add(new String("HELLO"));
// When I try to get a string from the Vector I use this.
// The program compiles but when I try to run it I get NullPointerExeption here
W = (String) Words.elementAt(0); //<--and here my guess is that this statement is inside another method than the one with the local Words vector defined. Thus this one accesses the global Words Vector that is never initalized and is Null. And that gives you the NullPointerException.
So try changing the statement
Vector Words = new Vector();
to
Words = new Vector();
or just remove it totally and move the Vector creation to the place where you introduce the global variable.
Of course I might be totally wrong since I cant see all of your code but that is my guess.
Hope it helps,
-teka -
Problem with different calendars under Mountain Lion
I upgraded recently from Snow Leopard to Mountain Lion and experiencing an annoying problem with the calendars "On My Mac" (I am using a MacBook Pro from mid 2009). With iCal under Snow Leopard I had seven calendars - Meetings, Performances, Family, etc. with different colors. After the switch to Mountain Lion these categories aren't maintained properly. Four of them have been seemingly merged into two, so that for example an event can't be categorized as "Family" but gets shifted automatically to "Meetings" (both calendars stay checked in the editing panel, but only one "sticks"). So I have three calendars I can use and a four I can't.
If I try to add a new calendar it appears in the list, but no event can be assigned to it.
Is there a limit to the number of calendars one can have?
I don't use iCloud, so there is no issue there.
I have one Google calendar (a work schedule I have subscribed to ) which also works with no problems.
Any ideas?Same problem when reseted the PRAM.
I read some Chinese Web , Many people got the same problem after upgrade to mountain lion
you can see the locked icon show in the bottom left conner even my card is unlock
I can read but can not delete any Photos
http://i83.photobucket.com/albums/j286/2cktang/OSX/ScreenShot2013-03-11at23227AM .png
you can see the locked icon show in the bottom left conner
But I can edit everything in my Harddisk
http://i83.photobucket.com/albums/j286/2cktang/OSX/ScreenShot2013-03-11at23235AM .png
External Hard Disk no locked icon show in the bottom left conner
http://i83.photobucket.com/albums/j286/2cktang/OSX/ScreenShot2013-03-11at23220AM .png -
Problem with joined piece under Exchange
I have two mail box one in Notes8.5 and a new one in Exchage 2010. When I receive a mail with a joined peice like a pdf when I want to use it by press it, in Notes no problem I can select the Application but under Exchange it's charged charged but nothing I can select application. It's a problem with Exchange or I have to do something with applications?
UPDATE: The problem has been fixed. It turned out I had a different alias than my login in my account, which was confusing things. Getting rid of it fixed the problem.
-
StringTokenizer class problem with strings in double quotes
Hello Technocrats,
I have a problem with tokenizing following string enclosed in (). (abc," India, Asia", computer engineer). My separator is ",", thus StringTokenizer class gives me 4 tokens namely abc, "India, Asia" and computer engineer. But I require that String in double quotes should be a single token. How to achieve this using StringTokenizer class? Or is there any other way?
Thanks in advance.Try
String[] str="abc,\" India, Asia\",computer engineer".split(",",1);
for(String s: str)
System.out.println(s);
}Thanks. -
Bug with RMI server under Unix
I have a server/client apps, and it work under Windows but not under Unix.
With Unix i have an exception :
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
at java.net.Socket.<init>(Socket.java:268)
at java.net.Socket.<init>(Socket.java:95)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:20)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:115)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:494)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:169)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:78)
at ServeurChatImpl_Stub.connect(Unknown Source)
at ClientDistantImpl.main(ClientDistantImpl.java:85)
Why?Your question is very vague. Are you running the client and the server on the same machine or not at least it seems so. Are you using UnicastRemoteObject, RemoteObject or Activatable for extension. Also post some of your code and settings only then would somebody be able to help u.
-
Problems with ARD and SwUpd Unix Command
Hi everybody
I have a problem sending UNIX commands to my clients, I work in a school with 500 macs, with 10.4 and 10.5 systems and all the computers download the updates from my Software Update Server, but when I try to send the command from ARD (sudo softwareupdate -i -a) the clients attemp to connect to Apple's servers instead my own SUS. It seems when I try to install with sudo command, overrides the address of my server.
I show you the output:
$ sudo softwareupdate -i -a
password:
2009-09-22 12:14:31.712 softwareupdate456 loader:didFailWithError:NSError "XML parser error:
Encountered unknown tag style on line 5
Old-style plist parser error:
Malformed data byte group at line 5; invalid hex
" Domain=SUCatalogLoader Code=0 UserInfo={
NSLocalizedDescription = "XML parser error:\n\tEncountered unknown tag style on line 5\nOld-style plist parser error:\n\tMalformed data byte group at line 5; invalid hex\n";
NSURL = http://swscan.apple.com/content/catalogs/index-1.sucatalog;
Error: XML parser error:
Encountered unknown tag style on line 5
Old-style plist parser error:
Malformed data byte group at line 5; invalid hex
Software Update Tool
Copyright 2002-2005 Apple
When I try this command as a normal user, everything is ok:
$ softwareupdate --list
2009-09-22 12:15:03.569 softwareupdate458 Loading CatalogURL http://xserve.fcaq.k12.ec:8088/index.sucatalog
Software Update Tool
Copyright 2002-2005 Apple
Software Update found the following new or updated software:
* iPhoto504-5.0.4
iPhoto Update (5.0.4), 41980K recommended
* JavaForMacOSX104Release7-1.0
Java for Mac OS X 10.4, Release 7 (1.0), 82580K recommended
* iTunesX-9.0.0
iTunes (9.0.0), 87530K recommended
* QuickTime-7.6.4
QuickTime (7.6.4), 51340K recommended restart
* RemoteDesktopAdmin33-3.3 v1.1
Remote Desktop Admin Update (3.3 v1.1), 57530K recommended
* SecUpd2009-005PPC-1.0
Security Update 2009-005 (PowerPC) (1.0), 81690K recommended restart
I hope you can help me... Thank you so muchI have the exact same problem with two PowerMac G5's. I need to have full resolution on the remote G5 which has no monitor connected, but only get to choose between PAL and NTSC TV resolution. This is really annoying, and in my opinion a major bug in ARD 3.1 and below. Why is the user forced to see such a small remote window if the remote computer is capable of much more?
-
Problem with columns length under Firefox
I have a problem with Firefox. Possibly, someone could help?
If you look at the following page www.tregor.fr using IE or
Netscape, there is no problem.
If you use Firefox, you will see that the display of the
bottom page is not correct. The middle column is longer than the
left and the right columns.
So the bottom block is not correctly sticked to the middle
block (the body background color appears at the bottom of the first
and third columns).
As I analyses, I saw that, under FireFox, the text in the
middle column seems to start a little lower than under IE or
Netscape. This may explain why the middle column is longer.
But I have no mean to avoid this.
Does anyone has experienced such a problem?
Regards.you could try this:
http://www.projectseven.com/tutorials/css/pvii_columns/index.htm -
Problems with Tuxedo8.0 under Windows 2003 Server
Hello All.
Could you please help me?
When we were choosing which OS to install on our Tuxedo developers server we
decided
to try Windows 2003 server. We did not suppose that we could have any
problems
with this choise. But we have!
We use it with DB 7.2 workgroup edition and Tuxedo 8.0 (PatchLevel 172).
When one of server processes crashes (for example by exit(1) or by
exception)
(it happend not so rarely, because this server is actively used in
development
and testing processes) we cannot restart this server process!
When I write "restartsrv -i SrvId" in command line nothing happens.
When I write "tmboot -i SrvId" it says "Duplicate server".
When I write "tmshutdown -i SrvId" it just hangs and I have to wait for 10
minutes
while it says "CMDTUX_CAT:949: WARN: Shutdown failed. 0 processes stopped."
Tuxedo WebAdministration conlsole says almost the same - "Failed to
deactivate SRVGROUP/200
(still in state ACTIVE)-10:CMDTUX_CAT:1689: ERROR: Could not shutdown any
servers".
As a result any server crash (including expected) leads to 15 minutes
waiting!!!
As you understand it cound not be accepted!... and it is very annoying. :-)
This problem never happened under Windows 2000 server (a week before I
returned from site
installation where this software works fine under Windows 2000 server).
How can we solve this problem?
Or should we downgrade our OS to Windows 2000?
With regards,
Dmitry.Dmitry,
Try a bbclean from the tmadmin command line to clean up the BBL so you will be
able to restart the server using the tmboot command.
In addition to this check the values for SCANUNIT and SANITYSCAN in the ubbconfig.
The observation that it takes 15 minutes for TUXEDO to discover that your server
has crashed suggests they have values that might be too high.
Winfried Scheulderman
"Dmitry Bond" <[email protected]> wrote:
Hello All.
Could you please help me?
When we were choosing which OS to install on our Tuxedo developers server
we
decided
to try Windows 2003 server. We did not suppose that we could have any
problems
with this choise. But we have!
We use it with DB 7.2 workgroup edition and Tuxedo 8.0 (PatchLevel 172).
When one of server processes crashes (for example by exit(1) or by
exception)
(it happend not so rarely, because this server is actively used in
development
and testing processes) we cannot restart this server process!
When I write "restartsrv -i SrvId" in command line nothing happens.
When I write "tmboot -i SrvId" it says "Duplicate server".
When I write "tmshutdown -i SrvId" it just hangs and I have to wait for
10
minutes
while it says "CMDTUX_CAT:949: WARN: Shutdown failed. 0 processes stopped."
Tuxedo WebAdministration conlsole says almost the same - "Failed to
deactivate SRVGROUP/200
(still in state ACTIVE)-10:CMDTUX_CAT:1689: ERROR: Could not shutdown
any
servers".
As a result any server crash (including expected) leads to 15 minutes
waiting!!!
As you understand it cound not be accepted!... and it is very annoying.
This problem never happened under Windows 2000 server (a week before
I
returned from site
installation where this software works fine under Windows 2000 server).
How can we solve this problem?
Or should we downgrade our OS to Windows 2000?
With regards,
Dmitry. -
Problems with Weblogic6.0 Under Linux
Hi,
I have been having this weird problem with weblogic 6.0 under linux.
I have WL6.0 installed on Redhat Linux 7.2 ( the 2.4 Kernel).
I start the WL server on Linux and my bean deploys successfully,
however I have a client bean on an NT box which tries to do a lookup
on the bean which resides on the Linux box.
I know that I get the initial context, because on the server side I
see the IP address being added to its client list , but as soon as I
try to do a lookup I get the error message
"Connection refused ..... etc....."
However , if I start the WL server on the NT box from where my client
bean resides, (and leave WL server running on Linux) everything works
fine , and I can reference the object.
This leads me to think that the following is happening :
The client actually connects the WL server on Linux looking for the
relevant stub classes etc.. but the WL server on Linux tells the
client to look for them else where , ie the machine from where it came
(in this case the NT machine)
This explains why when the WL server on NT is running all works fine ,
because the client goes back to the machine from where it came (NT
machine) and in this case the WL server is running so it can deal with
its requests !!
Running the client and server on Linux works fine and I can also run
the same code between NT machines and Solaris machines. As soon as I
introduce the Linux machine into the equation , I start getting this.
Any help , ideas would be greatly appreciated.
Thanks.Hi.
Strange. Please post the exception and the full stack trace here.
Thanks,
Michael
Zac Burke wrote:
Hi,
I have been having this weird problem with weblogic 6.0 under linux.
I have WL6.0 installed on Redhat Linux 7.2 ( the 2.4 Kernel).
I start the WL server on Linux and my bean deploys successfully,
however I have a client bean on an NT box which tries to do a lookup
on the bean which resides on the Linux box.
I know that I get the initial context, because on the server side I
see the IP address being added to its client list , but as soon as I
try to do a lookup I get the error message
"Connection refused ..... etc....."
However , if I start the WL server on the NT box from where my client
bean resides, (and leave WL server running on Linux) everything works
fine , and I can reference the object.
This leads me to think that the following is happening :
The client actually connects the WL server on Linux looking for the
relevant stub classes etc.. but the WL server on Linux tells the
client to look for them else where , ie the machine from where it came
(in this case the NT machine)
This explains why when the WL server on NT is running all works fine ,
because the client goes back to the machine from where it came (NT
machine) and in this case the WL server is running so it can deal with
its requests !!
Running the client and server on Linux works fine and I can also run
the same code between NT machines and Solaris machines. As soon as I
introduce the Linux machine into the equation , I start getting this.
Any help , ideas would be greatly appreciated.
Thanks.--
Developer Relations Engineer
BEA Support -
Repaint problems with an applet under Netscape 4.75
Hello,
I'm currently working on an applet created with VisualAge for Java, running under the standard Netscape 4.75 JVM, with Windows NT4.
I am experiencing problems with AWT components which randomly disappear, especially Labels and sometimes Panels. When I drag a window over the missing label and then drag it back, the label appears.
I have tried a lot of combinations with the repaint(), paint(), paintAll() and paintComponents() methods, but it has not been efficient for the moment. Introducing lots of repaint() calls on the concerned labels is even worse.
Is there a known bug in the Netscape 4.75 JVM concerning this problem ? Do you have an idea of what can be done to solve this problem ? Changing the JVM is not an option that can be chosen. Netscape 4.75 has been defined as the only browser for the whole project.
Thanks for your help !
KevinWell, I finally solved this problem.
For your information, the JVM included in Netscape 4.75 running under NT4 does not like having AWT labels with either Background or Foreground not initialised. If any of these 2 properties is not defined, it could sometimes occur that the JVM can't display the label.
Maybe you are looking for
-
How to find movie file from external hard drive in imovie?
i shot 29 gig of video on the road. i imported it into my macbook to the desktop. then i drag and dropped it into an external hard drive. now i have since dragged and dropped the file to my imac at home to work with it in imovie, but imovie cannot fi
-
Opening a color .JP2 file in Photoshop CS6 it's grayscale instead
I have two .JP2 files that i need to open and apply an artistic filter to. When I open the files they open as grayscale instead of color which they are. Am I missing something i have not worked with JP2 files before.
-
Dispute Cases on partial Payments
Hi How to create Dispute cases for partial payments? I have an invoice. A payment comes and its partial. We dont set up residuals. So on the invoice it says partially paid for some amount. And we want the job to create the dispute for the remaining a
-
IPad 1 will it stream Netflix with the HDMI adaptor?
Will IPad 1stream Netflix with HDMI adaptor? In HD.
-
Premiere Elements 11 won't let me upload large youTube file?
I have a macbook pro, running OS X (version 10.8.5) w/ 8G. of memory and a 1TB HD. The video I'm trying to upload from elements is 1hr and 7 min and yes, I know the default is 15 min, but I noticed some vid's on youtube almost 2hrs or more. So I wen