WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[resolved] [Plugin: Contact Form 7 to Database Extension] problem with RTL languages in the database/csv file (31 posts)

  1. zeevm.co.il
    Member
    Posted 3 years ago #

    hi mike. i want to thank you very much for the great job...

    well, us RTL people have problem with this plugin.
    when people fill the form in hebrew i get only quastin marks insted..

    you can have a look at the screenshot here:
    http://zeevm.co.il/1.JPG

    (we use UTF-8 in our sites)

    can you do somthing about that ?

    thank you anyway

  2. omrison
    Member
    Posted 3 years ago #

    Hi,
    same here,
    would be great it is would have UTF-8 support.

    thanks for your support.
    Great work !!
    Omri

  3. omrison
    Member
    Posted 3 years ago #

    hi, msimpson
    are you there? is this plugin still supported?

    i got into your code, trued to encode the data into UTF-8
    a change in the header did not solv the problem
    also tried to use utf8-decode method - did not do the job.
    any recommendations?

    thanks,
    Omri

  4. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Hi, I have been a bit busy with other stuff. I will look into understanding what I need to do. Once I get the post data I'm not sure if I need to do something before storing it int the DB or if I need to do something when I take it out of the DB.

  5. epresso
    Member
    Posted 3 years ago #

    The same problem here, with Polish language and special chars like ąśćłóńęź :)

  6. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Try executing these changes in your MySql DB, then try submitting a form again and please tell me how that looks.

    ALTER TABLE wp_CF7DBPlugin_SUBMITS MODIFY form_name longtext CHARACTER SET utf8;
    ALTER TABLE wp_CF7DBPlugin_SUBMITS MODIFY field_name longtext CHARACTER SET utf8;
    ALTER TABLE wp_CF7DBPlugin_SUBMITS MODIFY field_value longtext CHARACTER SET utf8;

  7. epresso
    Member
    Posted 3 years ago #

    Sorry for double reply

  8. epresso
    Member
    Posted 3 years ago #

    Hi! Works great!

    Looks like plugin, sets encoding to latin_swedish by default.

    Thx a lot!

  9. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Actually I made a minor copy-paste error, the columns should not be all "longtext" (doesn't really matter..) but the code should be:

    ALTER TABLE wp_CF7DBPlugin_SUBMITS MODIFY form_name VARCHAR(127) CHARACTER SET utf8;
    ALTER TABLE wp_CF7DBPlugin_SUBMITS MODIFY field_name VARCHAR(127) CHARACTER SET utf8;
    ALTER TABLE wp_CF7DBPlugin_SUBMITS MODIFY field_value longtext CHARACTER SET utf8;
  10. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    I notice that when I export to a CSV file, when I look at it in a text editor, I see the right characters, for example ąśćłóńęź, but when I open the file in MS Excel it displays them wrong: ąśćłóńęź

  11. omrison
    Member
    Posted 3 years ago #

    Hi,
    thanks for returning.

    yes, this is the problem.
    i think it is a BOM problem or something like that.

    when i open the file with notepad++ it is ok.
    when i open the file with excel it is ok.

  12. zeevm.co.il
    Member
    Posted 3 years ago #

    i think so 2.... After switching the DB to utf8_general_ci we can see Hebrew in the site.... but when exporting to CSV we get JIBRISH.

    I think so 2 that the problem is that the excel is looking for a file with BOOM but the exported file doesn't have any boom...

    We will be very happy for some help with this problem please.

    p.s.
    why is the default DB is saved as Swedish encoding ?

  13. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    I have release version 1.2 which handled the BOM issue and will automatically do the "alter table" commands to save form posts in UTF-8.

  14. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    NOTE: in version 1.2, in the admin panel, look under Contact -> Database to see your data

  15. zeevm.co.il
    Member
    Posted 3 years ago #

    hi that works great now in hebrew !!! thank you so much in the name of all hebrew speaking all over :) !

  16. omrison
    Member
    Posted 3 years ago #

    Sorry mate,
    the change did not solve the problem for me:
    1. working with cf7, version: 2.4.1
    2. upgrading cf7dbe to version: 1.2
    3. export csv -> hebrow comes scrambled.
    4. add new hebrew record to db via cf7.
    5. export csv -> hebrow comes scrambled.

    here are some hebrew letters for debug:
    נסה לתקן את הבאג
    i think that the problem is that the file is not saved as UTF-8, because when i save the file and opens it with notepad++, viewing at the encoding, shows a different character set.

    let me know if you need more assistance.
    Omri

  17. zeevm.co.il
    Member
    Posted 3 years ago #

    omri i have deleted the old version from my wordpress system (so that it will delete all tables) and re installed it... wrote somthing in contact form 7 and exported the file via this plugin and everything works great in hebrew... i think you need to try again, it's not conceivable that it's working for me and not for you...

  18. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    I tried your example letters for debug and it works for me. Also seems to work for roycegracie. Checking my config, I also have CF7 2.4.1.

    Do you see the correct characters on the web page view of the data? Is it only the export that does not look right?

    We should first verify that the input data is being saved as UTF-8. Look in your MySql and verify the fields in the wp_CF7DBPlugin_SUBMITS table are character set UTF8. If not, run the "alter table" command posted above, make a new form submission and export again.

  19. omrison
    Member
    Posted 3 years ago #

    ok,
    i deleted the cf7dbe plugin,
    delete wp_CF7DBPlugin_SUBMITS table,
    installed the cf7dbe plugin again
    filled a form in my site, anf nothing. same problem again.

    are there any other tabes needed to be deleted?
    roycegracie, what did you do inorder to make the upgrade work?
    thanks,

  20. zeevm.co.il
    Member
    Posted 3 years ago #

    i had the contact form 7 plugin on my site (version 2.3.1), i had deleted the Contact Form 7 to DB Extension plugin from the control panel (so it will delete all tables) and installed it again directly from the "add new plugin" in the admin panel...

  21. omrison
    Member
    Posted 3 years ago #

    did that couple of times, same problem.
    (cf7: version 2.3.1)

    -deactivate the plugin
    -delete the plugin
    -install the plugin
    -activate the plugin
    -write a mail from cf7
    -export to file + open
    -gibrish

    what browser are using?
    any suggestions?
    thanks,

  22. omrison
    Member
    Posted 3 years ago #

    hi msimpson,

    tried to delete the plugin,create a new form and write my details in the form.
    i see the correct letters on screen.
    when i press "export to csv" i open the excel file and see it in a wrong way. (in the db the letters are fine, encoding is utf8_general_ci)

    roycegracie,
    did you also export the file and opened it in excel?

    advice?
    thanks

  23. zeevm.co.il
    Member
    Posted 3 years ago #

    yes i did... to excel on office 2003

  24. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    OK, the the problem is definitely not in the DB, but is only related to the generation of the CVS file / Excel's ability to correctly read the file. I'm not finding much help on this on the internet.

    omrison & roycegracie: I would like to know from both which version of Excel you are using, which version of Windows, and your system local/default language. I'm working on Excel 2010 and Windows 7 in US English.

    FYI: to code the export, I referenced this link:
    http://wiki.sdn.sap.com/wiki/display/ABAP/Excel+files+-+CSV+format#Excelfiles-CSVformat-HowtocreateafilefromoutsideExcel and followed this guidance to make a UTF-8 BOM CSV file:

    Else, if the file starts with the bytes EF BB BF (UTF-8 Byte Order Mark, aka UTF-8 BOM), it is identified as being a text file in UTF-8 encoding

    I don't know what kind of Windows or Excel setting could affect the interpretation of the file format...anyone have any ideas?

    Aside: I experimented with UTF-16LE BOM and although I saw correct characters, Excel did not parse the delimiters, so everything was crammed into column A.

  25. zeevm.co.il
    Member
    Posted 3 years ago #

    i'm using windows XP professional hebrew edition and office 2003.
    the computer defauld is hebrew but my exel is an english version...

    actually when i text this from my other computer who has a diffarent excel 2003 version but same windows xp i get the hebrew in jibrish in the excel...

  26. omrison
    Member
    Posted 3 years ago #

    Hi msimpson,
    first of all thanks for all of your help. !!
    second, i did some more testing.
    when i save the file and opens it with notepad++ it comes out great.
    the encoding is UTF-8 which means the the plugin saves it correctly as a file.
    i'm using win XP with office 2003 sp3 (11.8169.8172)

  27. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    OK, I have a new tack on this: Download this version, and you will have an option to export to UTF-16LE. Try that and let me know if it works.

    http://plugin.michael-simpson.com/download/contact-form-7-to-database-extension.1.2.1.zip

  28. omrison
    Member
    Posted 3 years ago #

    ok !!
    it saves the file in with strange signs but the data itself opens correctly. (ללא כותרת.csv)
    Great progress.

    waiting for the official version.

  29. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    I can't seem to resolve the issue of the file name. Since this isn't critical, I released 1.2.1 with the changes I have.

    I set the file name as the name of the form + .csv. I tried encoding the name of the download file in the Content-Disposition header according to RFC 2231 but browsers are ignoring it. It is not clear to me if browsers don't support it or I'm not encoding/formatting that correctly.

  30. omrison
    Member
    Posted 3 years ago #

    msimpson,
    thanks for your help.
    great plugin.
    any road map?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic