View previous topic :: View next topic |
Author |
Message |
brianhsu
Joined: 17 Jan 2007 Posts: 9 Location: Taiwan
|
Posted: Wed Jan 17, 2007 10:56 pm Post subject: Error: 4invalid UTF-8 sequence |
|
|
I'm trying to build DWT, but bud seems refuse to work.
I have tried build some other program using bud_win_3.04, but it always shows that "Error: 4invalid UTF-8 sequence" and stopped.
I also checked my ?path? variable, and it doesn't contain any non-ascii characters.
What should I check?
====
C:\dmd\import>echo ?path?
C:\dmd\bin;C\dm\bin
=====
C:\dmd\import>bud_win_3.04 -release -O -clean -inline -lib -full -allobj dwt\al
l.d -T..\lib\dwt.lib -version=OLE_COM -version=DRAG_DROP
Error: 4invalid UTF-8 sequence
-----------------------------------------
Build debug version ...
C:\dmd\import>bud_win_3.04 -debug -g -unittest -clean -lib -full -allobj dwt\al
l.d -T..\lib\dwtd.lib -version=OLE_COM -version=DRAG_DROP
Error: 4invalid UTF-8 sequence
-----------------------------------------
you may need to copy "dwt.lib" "dwtd.lib" to \dmd\lib |
|
Back to top |
|
|
lio
Joined: 28 Apr 2006 Posts: 10 Location: Beijing
|
Posted: Fri Jan 19, 2007 10:50 am Post subject: |
|
|
Your path seems to be missing a colon?
C:\dmd\bin;C\dm\bin |
|
Back to top |
|
|
Freeagle
Joined: 04 May 2006 Posts: 8 Location: Slovakia
|
Posted: Wed Feb 07, 2007 7:54 am Post subject: |
|
|
Hello,
what else could cause this problem?
I know my path is ok. Actually, since i'm on my parents comp, and they are running localized version of windows (slovakian), i've created separate pathdmd just for dmd (so it doesnt contain any of our more weird characters) and adjusted build.cfg acordingly. Yet, the problem is still there.
I'm running out of ideas
Freeagle |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Feb 07, 2007 2:26 pm Post subject: |
|
|
Freeagle wrote: | Hello,
what else could cause this problem?
I know my path is ok. Actually, since i'm on my parents comp, and they are running localized version of windows (slovakian), i've created separate pathdmd just for dmd (so it doesnt contain any of our more weird characters) and adjusted build.cfg acordingly. Yet, the problem is still there.
I'm running out of ideas
Freeagle |
My guess is that the source file contains non-ASCII characters. Bud does not understand UTF encoded source files. This has been on the TODO list for ages now, so I better get it done ASAP. Sorry about this. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
Freeagle
Joined: 04 May 2006 Posts: 8 Location: Slovakia
|
Posted: Thu Feb 08, 2007 9:55 am Post subject: |
|
|
Nope, thats not the cause. Even if i pass it an unexisting file, the same error occures.
What are all the places that build tries to read/parse before it starts with file processing?
Freeagle |
|
Back to top |
|
|
luismarques
Joined: 25 Dec 2006 Posts: 5
|
Posted: Sun Mar 04, 2007 12:49 pm Post subject: problem is... |
|
|
I know what the problem is.
Cause 1:
Notice the accent mark in my name.
Code: |
>echo %HOMEPATH%
\Documents and Settings\Luis Marques
|
If I set HOMEPATH to another value the problem goes away.
Cause 2
Code: |
Unhandled D Exception (std.utf.UtfException "4invalid UTF-8 sequence") at KERNEL
32.dll (0x7c812a5b)
->us
#0 ?? () from KERNEL32.dll
#1 0x0041c570 in __d_throw@4 () from deh
#2 0x00407679 in _Dmain (pArgs = 0x0012ff4c00000001) at build.d:2303
#3 0x0041c0c8 in _main () from dmain2
#4 0x00427e85 in _mainCRTStartup () from constart
#5 0x7c816fd7 in ?? () from KERNEL32.dll
|
The code is:
Code: |
XXXX foreach( int lCnt, string p; lPotentialPaths)
XXXX {
XXXX if (p.length > 0)
XXXX {
2303 if (util.str.ends(p, std.path.sep) is False)
XXXX p ~= std.path.sep;
XXXX if (util.file2.FileExists(p ~ vConfigFile) == true)
XXXX {
XXXX vConfigPath = p.dup;
XXXX util.str.SetEnv("@P", std.path.getDirName(vConfigPath));
XXXX break;
XXXX }
XXXX }
|
|
|
Back to top |
|
|
luismarques
Joined: 25 Dec 2006 Posts: 5
|
Posted: Sun Mar 04, 2007 12:51 pm Post subject: |
|
|
OK,
So in the previous message I didn't include an accent mark in my name because the BBcode gives me an internal error. But just believe me that there is one .
Luiiiiiis "without an accent in the I because BBcode sucks" Marques |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sun Mar 04, 2007 2:38 pm Post subject: Re: problem is... |
|
|
luismarques wrote: | I know what the problem is. |
Wow! I would never have picked that one. Solving it is going to be interesting ... to do it properly I need to convert the code page that you're using in the DOS console to UTF, and that is not simple for the general case. And even if I do, how do I get it to see that UTF character string as a correct directory name. I'm going to have to research this a bit more. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
|