File names with international characters in not getting recognized in Linux server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File names with international characters in not getting recognized in Linux server
# 1  
Old 09-14-2014
File names with international characters is not getting recognized in Linux server

Hi,

I am using image Magick for resizing the images. Everything is working as long as the file names are in English.

But when the file names are in European accented fonts like
Code:
sólido_sitzbezüge_textil_in_design.jpg
stándard_gris_thorium_tallisé.jpg
NOIR_MÉTALLISÉ.jpg

the program is skipping the resizing. Looks like those files are not recognized in our server.
help
I do not know what settings needs to be changed at the server level to make it working (to recognize the European characters).

Please help.

Thanks in advance.

Merlin Joseph

Last edited by Merlin Joseph; 09-15-2014 at 02:59 AM.. Reason: Please use code tags
# 2  
Old 09-14-2014
Are you running the image Magick resize from within a script or on the command line? If your using a script please try to resize an individual file from the command line.

It this still dosn't work please post the command you are using and any error messages or output that is displayed.
This User Gave Thanks to Chubler_XL For This Post:
# 3  
Old 09-15-2014
Hi Chubler XL,

Thanks. I am resizing the images within the script. Here is my code block.
Code:
for img_size in $(echo "$IMAGE_SIZES" | tr "," " ") ; do test -e "dealer_images/$img_size/dealers/$cdealer_lower" || mkdir -p "dealer_images/$img_size/dealers/$cdealer_lower" if test "$(jobs | grep convert | wc -l)" -ge "$RESIZE_CONCURRENCY" ; then
wait
fi
/bin/nice -n 19 /usr/bin/convert "dealer_images/thirdparty/dealers/$cdealer_lower/$image" -strip -geometry "$img_size" "dealer_images/$img_size/dealers/$cdealer_lower/$image" &
done

I am not getting any error. It is just skipping the resize because it is not identifying such file names with international characters.

Do I need to install any font or locale settings?

Please help me.

Merlin Joseph

Last edited by Merlin Joseph; 09-15-2014 at 01:52 AM..
# 4  
Old 09-15-2014
What is $image set to?
# 5  
Old 09-15-2014
@RudiC

$image contains an image name. I am reading a file with image URLs assigning the image name (after downloading) to the variable called image.

Then resizing the $image within the loop.

/bin/nice -n 19 /usr/bin/convert "dealer_images/thirdparty/dealers/$cdealer_lower/$image" -strip -geometry "$img_size" "dealer_images/$img_size/dealers/$cdealer_lower/$image"

Thanks
Merlin Joseph

Last edited by Merlin Joseph; 09-15-2014 at 06:24 AM..
# 6  
Old 09-15-2014
Can you put a test in just before your image Magick call like this:

Code:
IMG="dealer_images/thirdparty/dealers/$cdealer_lower/$image"
[ -f "$IMG" ] && echo "Image file exists" || echo "Image $IMG file not found"

Just to confirm you have the correct path to the image file
# 7  
Old 09-16-2014
Hi Chubler XL,


Thanks again .

Yes, I have already checked the availability of those images because I am downloading the images from a third party URL to the local server and then do the resizing.

Such European characters are shown properly in my Windows system but not on Linux server. They are shown with some junk characters whereever European characters are present in the image file name.


Merlin Joseph

Last edited by Merlin Joseph; 09-16-2014 at 06:38 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

List the file names available on FTP server before selecting the required file

Below is my script code.which shows the environment name and then fetch the file from the ftp server but I am facing one issue.The script should be run in both way.We can pass the arguments with script and select the environment name then file name.Here the issue is I am not able to list the files... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies

2. UNIX for Dummies Questions & Answers

How to remove first few characters from multiple file names without do loop?

Hi Fellows, I was wondering how I can remove first few characters from multiple file names without do loop in unix? e.g. water123.xyz water456.xyz to 123.xyz 456.xyz Thanks Paul Thanks. (3 Replies)
Discussion started by: Paul Moghadam
3 Replies

3. UNIX for Dummies Questions & Answers

[solved]removing characters from a mass of file names

I found a closed thread that helped quite a bit. I tried adding the URL, but I can't because I don't have enough points... ? Modifying the syntax to remove ! ~ find . -type f -name '*~\!]*' | while IFS= read -r; do mv -- "$REPLY" "${REPLY//~\!]}"; done These messages are... (2 Replies)
Discussion started by: rabidphilbrick
2 Replies

4. Tips and Tutorials

How to manage file names with special characters

One of the common questions asked are: how do i remove/move/rename files with special (non-printable) characters in their name? "Special" doesn't always mean the same. As there are more and less special characters, some solutions are presented, ranging from simple to very complicated. Usually a... (0 Replies)
Discussion started by: bakunin
0 Replies

5. Shell Programming and Scripting

Finding File Names Ending In 3 Random Numerical Characters

Hi, I have a series of files (upwards of 500) the filename format is as follows CC10-1234P1999.WGS84.p190 each of this files is in a directory named for the file but excluding the extension. Now the last three numeric characters, in this case 999, can be anything from 001 to 999, I need to... (3 Replies)
Discussion started by: roche.j.mike
3 Replies

6. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

7. Red Hat

newbie: Linux Server Names & Types..!!!

Any one tell me about the list of Redhat Linux Enterprise 5 SERVERS and their functions. thanks (3 Replies)
Discussion started by: salman103
3 Replies

8. UNIX for Dummies Questions & Answers

Listing full file names with the exact length of 3 characters

This is what I have to do: Display the full file name (including the full path) and file size of all files whose name (excluding the path) is exactly 3 characters long. This is the code I have: find / -printf "Name: %f Path: %h Size: %s (bytes)\n" 2>/dev/null | grep -E "Name: .{3,} Path" |... (7 Replies)
Discussion started by: Joesgrrrl
7 Replies

9. Shell Programming and Scripting

Weird Ascii characters in file names

Hi. I have files in my OS that has weird file names with not-conventional ascii characters. I would like to run them but I can't refer them. I know the ascii # of the problematic characters. I can't change their name since it belongs to a 3rd party program... but I want to run it. is there... (2 Replies)
Discussion started by: yamsin789
2 Replies

10. Shell Programming and Scripting

Replace characters in all file names in a particular directory

Hi, I have searched the forum on how to mass replace the file names. We are doing the migration and I am trying to accomplish a task where I have to replace all UNIX scripts in a particular directory that start with bdw to fdm... For example: bdw0110137.sh should be fdm0110137.sh Keep the... (4 Replies)
Discussion started by: madhunk
4 Replies
Login or Register to Ask a Question