See: http://drupal.org/node/29574#comment-62792

node_import uses fgetcsv,
which should use the PHP LANG environment variable
(which is en_US.UTF-8, in my case).

However, all non-english (in my case, Hebrew) characters are still imported as question marks.

Any help will be appriciated.

Environment: Drupal 4.6, PHP4.3.11

Comments

orionvortex’s picture

I would also like this feature. I really hope that someone comes up with a workaround soon so that we can import non-english characters.

Robrecht Jacques’s picture

Status: Active » Closed (duplicate)

Duplicate of import file with greek characters. The way to do it is to save your file in UTF8.

mademarest’s picture

is there a "for dummies" explanation?

I'm using Excel 2007.

How 'bout a way of doing it without "programming?"

thanks for your help!!

(turkish CSV into Drupal without losing foreign characters...thanks)

andy inman’s picture

Just to add, I can't get import to work either - accented characters (such as í) cause the string to be truncated at that point. I've tried both 8-bit and Unicode versions of the source file.

http://www.php.net/fgetcsv says:

"Note: Locale setting is taken into account by this function. If LANG is e.g. en_US.UTF-8, files in one-byte encoding are read wrong by this function."

... Which makes me think that maybe node_import needs to ask what character set the import file is using, and then set LANG accordingly. However, that also implies that a Unicode source ought to work - It doesn't for me. Maybe I need some other PHP settings?

onelittleant’s picture

Thanks to Robrecht!

I'm on Windows Vista. The solution was to open the .csv file using notepad, then choose save as, and change the encoding to UTF-8. My import data truncation problems were eliminated!

This change worked for strange characters in english content (like slanted double quotes) as well as german characters like ß, ä, etc.

RinatB’s picture

Component: Code » Documentation
Assigned: Unassigned » RinatB

I'm openning the CSV file with the excel , there i'm changing my information (to hebrew) and after saving the file again in csv format the hebrew chars changed to ??? and and change the encoding to UTF-8 does not help me ...