יום חמישי, 12 באפריל 2007

Import CSV file with hebrew chars to google calendar

This explains how to overcome the problem of non-latin characters turning into question marks (described in http://groups.google.com/group/google-calendar-help-howto/msg/9932c3a... and others) and/or of non-latin characters showing as gibberish (see e.g. http://groups.google.com/group/google-calendar-help-bugs/msg/40454462...)

The instructions are written for Hebrew, but should work with obvious changes for other non-latin scripts.

If your events show OK in the CSV file, go to "Finally" below.

If they show as question marks, do this:
In Outlook:
1. Import and Export -> export to a file -> CSV (Windows). Save as file.csv
2. Import and Export -> export to a file -> Excel. Save as file.xls

In Excel:
1. Open both files.
2. Copy all the columns (from the 2nd row on) with Hebrew characters from XLS to the CSV file (replacing the questions marks).
Again, be careful not to replace the headers in the 1st row!
3. Close the XLS.
4. Save and close the CSV (disregard the format incompatibilities warning).

Finally:
1. Rename file.csv to file.txt
2. Open the file.txt in IE, set encoding to Hebrew(Windows)
3. Save as, select Unicode (UTF-8), save as file-u.txt
4. Optional - open in Notepad and replace all """ (three quote marks) with " (one quote mark).
This eliminates quotes at the end of the event name, which will otherwise jump to the beginning of the event name (since it is LTR formatted)
5. Rename file-u.txt to file-u.csv
6. Import file-u.csv to Google Calendar. It's a good idea to try this on a test calendar first

4 תגובות:

Unknown אמר/ה...

שלום אמיר,

אני רוצה להודות לך מקרב לב

שפתרת לי את הבעיה של הגיבריש,
אשר לא הצלחתי למצוא לה פתרון זמן רב!

תודה רבה,
אלדד

ohadsc אמר/ה...

CSV is problematic because it doesn't support recurring events
You are better off using ICS
In order to support non-ASCII characters you need to make sure that the UTF-8 BOM is present in the file
For more information see my related blog post:
http://www.ohadsoft.com/2015/09/importing-windows-live-calendar-to-google-calendar/

Unknown אמר/ה...

תודה רבה על העזרה
אני פשוט עשיתי כך:
1. דרך האקסל ערכתי ושמרתי קובץ CSV
2. קליק ימני על הקובץ השמור
3. open with
4. בחרתי ב-notepad
5. file --> save as
6. בחרתי UTF-8 בקידוד

Unknown אמר/ה...

הרבה יותר פשוט:
1. פתח קובץ באמצעות אקסל.
2. שמור קובץ כקובץ XSLX.
3. שמור קובץ XSLX כקובץ CSV עם ENCODING UTF8
4. טען קובץ ליומן גוגל