User import/Node Import, UTF characters and Excel

Many have encountered this unicode/utf encoding problems in their programming life. It is just a drag to make it right and without knowing all the stuff around it and understanding it you will have bugs and problems. You will usually import data to drupal with CSV files. It's fine until you start using non english alphabet. You will usually export your database as CSV from phpmyadmin which should do it fine and preserve unicode chars and save your csv file as UTF-8 file. So here is everything fine and if you import data like that it should import nicely. But maybe you will use Excel to edit this CSV before importing and this is where problems start. Your usuall CSV if formatted with double quotes like "Value1","value2" etc but excel takes this out and if you save your CSV file with excel you would get just plain value1,value2  (take a look with notepad and you will see the difference) also your file would probably saved as ANSI and not UTF-8. So you would need to with both of this problems. First one you can fix with this clever MACRO, copied from another place so here goes that text.
 

Microsoft provide access to Visual Basic in the form of Macros from within Excel that allow us to do things Excel can?t manage by itself. To create a VB Macro open the Visual Basic Editor (Alt+F11) then from the menu Insert > Module. This should open a new module code window that you should copy and paste in the following script:

Sub CSVFile()

Dim SrcRg As Range
Dim CurrRow As Range
Dim CurrCell As Range
Dim CurrTextStr As String
Dim ListSep As String
Dim FName As Variant
FName = Application.GetSaveAsFilename("", "CSV File (*.csv), *.csv")

ListSep = Application.International(xlListSeparator)
  If Selection.Cells.Count > 1 Then
    Set SrcRg = Selection
  Else
    Set SrcRg = ActiveSheet.UsedRange
  End If
Open FName For Output As #1
For Each CurrRow In SrcRg.Rows
  CurrTextStr = ??
For Each CurrCell In CurrRow.Cells
  CurrTextStr = CurrTextStr & """" & CurrCell.Value & """" & ListSep
Next
While Right(CurrTextStr, 1) = ListSep
  CurrTextStr = Left(CurrTextStr, Len(CurrTextStr) - 1)
Wend
Print #1, CurrTextStr
Next
Close #1
End Sub

Now close the script editor, back in Excel run your macro from the menu Tools > Macro > Macros (Alt+F8). You should see a macro named CSVFile selected then all you need to do is click Run. A Save As window should appear that will need you to enter a name for your new file and select a location you will remember to save it to.

and with this and saveing your file as UTF-8 you will not have any problems importing your CSV file/database export.