Bug #36281 Visual C++ 2005 cannot compile sql_locale.cc
| Submitted: | 23 Apr 2008 9:46 | Modified: | 24 Apr 2018 11:40 |
|---|---|---|---|
| Reporter: | Meiji KIMURA | Email Updates: | |
| Status: | Unsupported | Impact on me: | |
| Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
| Version: | 5.0.58 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any |
[23 Apr 2008 9:46]
Meiji KIMURA
[23 Apr 2008 11:46]
Vladislav Vaintroub
Meiji, UTF8 BOM is no good on Unix..I belive adding #ifdef _MSC_VER #pragma setlocale "C" #endif somewhere at the start of file might help, but I'm not 100% sure about it (have neither Japanese VS nor OS). Can you verify?
[23 Apr 2008 11:48]
Vladislav Vaintroub
The code fragment in pervious entry should be rather written as
#ifdef _MSC_VER
#pragma setlocale("C")
#endif
[24 Apr 2008 20:43]
Meiji KIMURA
I added '#pragma setlocale("C")' immediate before '#include "mysql_priv.h"' of sql_locale.cc, But the situation is not changed. The same errors occurs.
[25 Apr 2008 20:37]
Vladislav Vaintroub
Have you tried the VS2005 SP1 yet, or the corresponding compiler from Vista Platform SDK? The knowlegde base article for SP1 (http://support.microsoft.com/kb/918526) states "FIX: Error message when you use Visual Studio 2005 to compile C++ source code: "Warning C4819: The file contains a character that cannot be represented in the current code page" I would expect this error to be fixed with the compiler update.
[27 Apr 2008 23:47]
Meiji KIMURA
I've already apply SP1 to my Visual C++ 2005. The situation does not change.
(Visual C++ 2008 Express edition's behavior is the same.)
But I found a workaround this situation. If I set OS's language set to 'English_United States.1252', these errors not occur.
I try to find the method not OS but compiler or source code.
But I cannot find parameter of compiler. I found the method to specify on source code like this,
#pragma locale("English_United States.1252")
But this does not change the error situation.
As a result, we have to OS language & codeset in Japanese OS environment.
[1 May 2008 12:45]
Vladislav Vaintroub
I submitted a bug for Microsoft compiler here https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=341454
[21 Oct 2008 6:13]
John Robbet
I met the problem at first, and I have made the build successfully. My OS is WinXP SP2 CN, and I think this issue would only be in non-English Windows system. Open the file sql\sql_locale.cc in vs(mine is VS 2005), then 'File->Advanced save options', put the codeset to 'UTF-8', save the file in the editor by right click on the file name. After this, build can be successful. :-)
[9 Apr 2009 4:00]
jack andrews
Guofeng Zhang just gave feedback on this bug: > The Language for non-Unicode programs on the computer must be set to > English (United States), or the re-saved file still cannot be accepted > by VS 2005.
[10 Apr 2009 2:58]
Guofeng Zhang
before open sql_locale.cc in VS 2005, the Language for non-Unicode programs (on the Advanced tab of Regional and Language Options applet) on the computer must be set to English (United States), or the re-saved file still cannot be accepted by VS 2005.
[21 Sep 2010 1:22]
Justin Xu
um..........anyone solves it???
[29 Sep 2010 11:10]
Jonathan Perkin
Is this still relevant? 5.0 is EOL, we use VS 2005 on 5.1 and VS 2008 for 5.5+.
[29 Oct 2010 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[24 Nov 2012 9:39]
MySQL Verification Team
This problem is reproduced latest environment. o VS 2010 Pro o Vista Business (32-bit) Japanese version o MySQL 5.5.x [Workaround] You can change OS System local from japanese to western (e.g. latin1), then avoid this problem and compile them completely.
[24 Dec 2012 8:37]
Erlend Dahl
Meiji, please comment on bug#11748435 going forward. I have set the internal bug to state 11.
[24 Apr 2018 11:40]
Yngve Svendsen
Posted by developer: EOL OS and almost EOL MySQL version. Thus closing this. If this is still observable on recent MySQL versions and environments, please reopen.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.046 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.