windows to dos file name conversion x'ad'


 
Thread Tools Search this Thread
Top Forums Programming windows to dos file name conversion x'ad'
# 1  
Old 04-17-2009
windows to dos file name conversion x'ad'

We are running a java client server application on Solaris 10. External Users from around the country attach windows files through a client and these files are stored on a unix server. Recently I've started getting files that have a hex value of ad in their names. This causes a tar command to fail in an archive process that usually happens a couple of months after the file arrives.

I've searched all over and have not been able to find anyone else with this issue. The x'ad' value is in the files actual name, not inside the file. Does anyone know how my users are doing this to me?
# 2  
Old 04-17-2009
It may be part of a multibyte UTF8 character sequence. this glyph has that in the middle for example. What bytes comes before and after it?

I'm not sure why this would cause it to fail. 0xad may be unusual in a filename but not really verboten...
# 3  
Old 04-17-2009
The tar throws a utf8 conversion error and fails because we have the e option specified. Here's one of the file names:

Code:
AMCINHÂ*_DataSheet_Confidential_Data_Highly_Restricted.xls

And here's the hex dump:

Code:
0000000 414d 4349 4e48 c2ad 5f44 6174 6153 6865
0000020 6574 5f43 6f6e 6669 6465 6e74 6961 6c5f
0000040 4461 7461 5f48 6967 686c 795f 5265 7374
0000060 7269 6374 6564 2e78 6c73 0a00

# 4  
Old 04-17-2009
The character sequence in its entirety is c2 ad, which is valid UTF8 encoding for U+00AD, 'soft hyphen'. I think that it's a fancy formatting-hint character suggesting where to split a word when it must be linewrapped. Which is of course meaningless to a tape archive, and probably doesn't have much business being in file names in the first place.

Last edited by Corona688; 04-17-2009 at 05:48 PM..
# 5  
Old 04-17-2009
Well that's interesting. I have never looked into this whole unicode thing before. So it encodes most things using one byte and the standard ascii charactors but it can also use two bytes to encode another 100,000 or so symbols. I guess that ought to last them awhile.

I take it various displays can't really handle them as they print differently when I cut and paste them from unix to windows and different applications under each system.

I noticed that vista has a lot of new locales defined. I have around 1000 clients out there. So far four of them have attached files with this string. I don't normally deal with them directly but I did email 2 of them to see what operating system they are using. I'm waiting for their replies. I bet they have vista.
# 6  
Old 04-17-2009
Quote:
Originally Posted by gillbates
Well that's interesting. I have never looked into this whole unicode thing before. So it encodes most things using one byte and the standard ascii charactors but it can also use two bytes to encode another 100,000 or so symbols. I guess that ought to last them awhile.
One byte for ASCII, two to four bytes for everything else. It should last them a very long time. Unfortunately UTF8 doesn't just include new glyphs it includes new control characters. Most things ignore them, a few throw up on them, and a precious few actually process them properly.
Quote:
I take it various displays can't really handle them as they print differently when I cut and paste them from unix to windows and different applications under each system.
Depends whether these various displays are variously displaying UTF-8. You can't dump UTF-8 things in another code set and have it understoood. One glorious day, everything will be UTF-8. Until then, we have this. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

DOS/VB script of Remote Windows Server from AIX

Hi We use to run DOS and VB script in Windows Server . Now the requirement is to trigger the same script from AIX server by shell script , thus it would be executed in Remote Windows Server . Is it possible ( though SSH or any other way ) ? Thanks (2 Replies)
Discussion started by: Sourajit Seth
2 Replies

2. Windows & DOS: Issues & Discussions

Deleting all files containing string (WINDOWS DOS)

So I want to skim through all folders (ongoing from the curr dir) and delete all files that contain the string: "in conflikt standing copy". Is this possible WITH DOS ? (1 Reply)
Discussion started by: pasc
1 Replies

3. Shell Programming and Scripting

Command for unix to dos conversion

Dear All Could you please advice how do we convert a unix file to dos I know one command,ux2dos, which somehow does not work to give desired output Inputs on this is appreciated Thanks, Suresh (3 Replies)
Discussion started by: sureshg_sampat
3 Replies

4. Windows & DOS: Issues & Discussions

How to connect SFTP(Linux) from Windows DOS

I need to write a batch script for file transfer from SFTP to Windows system. SFTP is on Linux system. I kept this code in batch file and executing it.. but not working.. Even i tried from Command prompt like this "open sftp.host.com" but getting error. Can anyone help with the code and tell me how... (15 Replies)
Discussion started by: mohantmk
15 Replies

5. Windows & DOS: Issues & Discussions

DOS/Windows CR to a UNIX LF 17 MB text file

Hello, I am on a WinXP home machine with a 17 MB text file and I need to change the DOS/Windows CR to a UNIX LF. Does anyone know how I can do this or even better a WinXP program that can do this for me ? My hobby is my Family History. I know very little about all this type stuff and I... (9 Replies)
Discussion started by: tex
9 Replies

6. Shell Programming and Scripting

NOHUP utility in windows / DOS

Hi is there any similar nohup utility in DOS / Windows as in unix ?. If yes plz let me know the implememntation soon. Its very urgent. Regards Aru (2 Replies)
Discussion started by: aarora_98
2 Replies

7. UNIX for Dummies Questions & Answers

?Using Unix commands in Microsoft (Windows') DOS Prompt?

I ran a search for "Unix Dos" in the search field box and checked a few pages' results but did not find what I was looking for. I am trying to find out if there are choices of applications that would enable using Unix commands inside a Windows environment, particularly the DOS Prompt. The only... (2 Replies)
Discussion started by: HLee1981
2 Replies

8. Shell Programming and Scripting

conversion from Unix to windows

Hey guys, Im looking to convert the following script into batch language for windows / DOS but my knowledge of batch syntax is nill - but i have good knowledge of UNIX shell...can anyone help? #!/bin/sh if ; then echo "UNCERTAIN:" echo "Too few arguments" echo "Usage: file_exists... (3 Replies)
Discussion started by: kiwi_bloke
3 Replies

9. Shell Programming and Scripting

Dos to Unix conversion

Hi ! I need to convert a DOS batch file to Unix Shell script. Can anybody help me by providing equivalent Unix shell script code to this DOS batch code?. for /F "tokens=2,3,4 delims=/- " %%i in ("%date%") do set DateStamp=%%k%%i%%j Any help would be great. Thanks, John. (1 Reply)
Discussion started by: john413
1 Replies
Login or Register to Ask a Question