We have developed a web app hosted on Azure, which copies the records in a SQL View to a MySQL Db for a Wordpress Website.
All is working fine, but it is a scientific website and some of the records contain greek letters. These characters are not being carried over correctly, and display as question marks on the website.
On investigation, I have read that others had success with a similar issue by forcing conversion of the field containing the greek characters to UTF-8 with a SQL command on the My SQL destination Db, others found converting it to Latin1 resolved their issue. However, I had success with neither of these. I also discovered that the greek characters appear to be converted to question marks before
being sent to the MYSQL: When outputting the field values with console.writeline() in the vb code, the values expressed display '?'s instead of greek characters before
they are exported to the MySQL Db.
So I'm wondering if there is any known process which I can put those fields through to ensure the greek characters are kept and remain untranslated to '?'s in the export functionality.
Incase it helps, following is a sample of the code used to write the values from the SQL view to the MySQL table:
Dim DBAAW As New MasterDBEntities '(this is the SQL Db)
'first find the Antibody Record by its HCConstructNumber
Dim WARecord = (From wq In DBAAW.WP_Whole_Antibodies_on_Sale
Where wq.HCConstructNumber = HCC
If (WARecord IsNot Nothing) Then
SyncHelp.AddNewMeta(postID, "wpcf-specificitystatement", .SpecificityStatement)
Console.WriteLine("Synonyms: " & .Synonyms)
SyncHelp.AddNewMeta(postID, "wpcf-synonyms", .Synonyms)
'And this is what SyncHelp.AddNewMeta does to update the post's record in MySQL:
Public Shared Sub AddNewMeta(p1d As Long, metakey As String, metaval As String)
Dim PMMta As New absolute_fix1Entities '(the MySQL Db)
Dim xdel As Integer
Dim meta = (From s In PMMta.antibody_postmeta
Where s.post_id = p1d And s.meta_key = metakey
If meta IsNot Nothing Then
meta.meta_value = Mval
So you see I am simply writing the value stored in the SQL View's [SpecificityStatement] and [Synonym] field, to the corresponding [meta_value] field in the MySQL's post_meta table for Wordpress.
This works fine for all string data types, but not for the greek characters in them.
Is there something else I should be doing here to keep Greek characters as they are (and not change them to '?'s) ?