digitalmars.D - Invalid trainling code unit
- rumbu (6/6) Dec 14 2012 I'm trying to understand how strings are working in D. I got the
- Joshua Niehus (6/12) Dec 14 2012 works for me and on the DPaste site:
- rumbu (5/19) Dec 14 2012 I'm using D-Ide, compiling with "DMD32 D Compiler v2.060" with
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (6/12) Dec 14 2012 Works here as well.
- rumbu (4/9) Dec 15 2012 Yes, it was ANSI encoded (I think this is the default encoding in
I'm trying to understand how strings are working in D. I got the following error when declaring a simple string variable: "Invalid trailing code unit": wstring needle = `Être sans la verité`; Considering that the line obove is copied exactl from the site examples, what I'm doing wrong?
Dec 14 2012
On Saturday, 15 December 2012 at 06:07:10 UTC, rumbu wrote:I'm trying to understand how strings are working in D. I got the following error when declaring a simple string variable: "Invalid trailing code unit": wstring needle = `Être sans la verité`; Considering that the line obove is copied exactl from the site examples, what I'm doing wrong?works for me and on the DPaste site: http://dpaste.dzfl.pl/00b66ba8 what platform are you on and what version of D are you using? are you passing any compiler flags or just running plain ol' "$>rdmd test.d" ?
Dec 14 2012
On Saturday, 15 December 2012 at 06:22:50 UTC, Joshua Niehus wrote:On Saturday, 15 December 2012 at 06:07:10 UTC, rumbu wrote:I'm using D-Ide, compiling with "DMD32 D Compiler v2.060" with the following arguments: -c "$src" -of"$obj" $importPaths -gc -debug -w -unittestI'm trying to understand how strings are working in D. I got the following error when declaring a simple string variable: "Invalid trailing code unit": wstring needle = `Être sans la verité`; Considering that the line obove is copied exactl from the site examples, what I'm doing wrong?works for me and on the DPaste site: http://dpaste.dzfl.pl/00b66ba8 what platform are you on and what version of D are you using? are you passing any compiler flags or just running plain ol' "$>rdmd test.d" ?
Dec 14 2012
On 12/14/2012 10:07 PM, rumbu wrote:I'm trying to understand how strings are working in D. I got the following error when declaring a simple string variable: "Invalid trailing code unit": wstring needle = `Être sans la verité`; Considering that the line obove is copied exactl from the site examples, what I'm doing wrong?Works here as well. My guess is that the encoding of the source code is not one of the Unicode encodings, rather a "code table" encoding. If so, please save the source code in a UTF encoding, e.g. UTF-8. Ali
Dec 14 2012
On Saturday, 15 December 2012 at 06:37:51 UTC, Ali Çehreli wrote:Works here as well. My guess is that the encoding of the source code is not one of the Unicode encodings, rather a "code table" encoding. If so, please save the source code in a UTF encoding, e.g. UTF-8. AliYes, it was ANSI encoded (I think this is the default encoding in D-IDE), I converted the file to UTF-8 and it's compiling. Thanks for your help.
Dec 15 2012