Tag Archives: utf-8

PHP to MySql to CSV to Excel UTF-8

Questions: I know this has been discussed several times but yet I’m getting crazy dealing with this problem. I have a form with a submit.php action. At first I didn’t change anything about the charsets, I didn’t use any utf8 header information.. The result was that I could read all the ä,ö,ü etc correctly inside… Read More »

Interop.Excel UTF-8 encoding when saving file

Questions: I’m having an issue saving an Excel file as a CSV with UTF-8 encoding. Because I have non standard characters (different language) in my Excel document it caused issues when saved as a CSV. This was solved here by setting the web options encoding to UTF-8. I am creating a basic C# program that… Read More »

PHP connect SQL server 2008 – How set utf-8 using odbc_connect

Questions: I using ODBC to connect sql server 2008 like $virtual_dsn = ‘DRIVER={SQL Server};SERVER=MyServerName;DATABASE=myDatabase’; $conn = odbc_connect($virtual_dsn,’sa’,’mypass’) or die(‘ODBC Error:: ‘.odbc_error().’ :: ‘.odbc_errormsg().’ :: ‘.$virtual_dsn); if (!$conn){ if (phpversion() < ‘4.0’){ exit(“Connection Failed: . $php_errormsg” ); } else{ exit(“Connection Failed:” . odbc_errormsg() ); } } // This query generates a result set with one record… Read More »

HttpServletRequest UTF-8 Encoding [duplicate]

Questions: This question already has an answer here: How to pass Unicode characters as JSP/Servlet request.getParameter? 4 answers Answers: Paul’s suggestion seems like the best course of action, but if you’re going to work around it, you don’t need URLEncoder or URLDecoder at all: String item = request.getParameter(“param”); byte[] bytes = item.getBytes(StandardCharsets.ISO_8859_1); item = new… Read More »

Easy way to remove UTF-8 accents from a string?

Questions: I want to change this sentence : Et ça sera sa moitié. To : Et ca sera sa moitie. Is there an easy way to do this in Java, like I would do in Objective-C ? NSString *str = @”Et ça sera sa moitié.”; NSData *data = [str dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *newStr = [[NSString… Read More »