Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-24 Thread Lubos Pintes
Hello, Here is a minimal program, it doesn't work as I expected either because there is a bug somewhere in the RTL, or, more probably, I misunderstood something. Basically, I am reading an UTF-8 encoded text from stdin, and collecting it in a WideChar array. I am assigning UTF-8 string to a

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-24 Thread Michael Van Canneyt
On Thu, 24 Dec 2015, Lubos Pintes wrote: Hello, Here is a minimal program, it doesn't work as I expected either because there is a bug somewhere in the RTL, or, more probably, I misunderstood something. Basically, I am reading an UTF-8 encoded text from stdin, and collecting it in a

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-24 Thread wkitty42
On 12/24/2015 07:44 AM, Lubos Pintes wrote: Hello, Here is a minimal program, it doesn't work as I expected either because there is a bug somewhere in the RTL, or, more probably, I misunderstood something. Basically, I am reading an UTF-8 encoded text from stdin, and collecting it in a WideChar

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Mark Morgan Lloyd
Lubos Pintes wrote: Hello Mark,The result isthe same, I tried it before I wrote my message.I even tried to temporarily write ordinal codes of characters, it seems that a string is not automatically converted to a WideString when assigned, there wereno zeros, like H#0e#0l#0, etc. Dňa 23. 12.

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Tomas Hajny
On Wed, December 23, 2015 11:41, Lubos Pintes wrote: Hello Lubos, > The result isthe same, I tried it before I wrote my message. > I even tried to temporarily write ordinal codes of characters, it seems > that a string is not automatically converted to a WideString when > assigned, there wereno

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Michael Van Canneyt
On Wed, 23 Dec 2015, Lubos Pintes wrote: I tried it now, and it doesn't work. I also tried all string variables changed to WideString. In that case, please file a bugreport with an example console program for FPC. Michael. y ___ fpc-pascal

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread silvioprog
On Wed, Dec 23, 2015 at 6:35 AM, Lubos Pintes wrote: > Hello, > I have a text in the WideString variable. I want to send this text to a > SAPI5 synthesizer. I am doing this as follows: > WideStr := Format('%s', [Pitch, Text]); [...] Assuming that you tested it on

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Lubos Pintes
I tried it now, and it doesn't work. I also tried all string variables changed to WideString. Dňa 23. 12. 2015 o 11:59 Michael Van Canneyt napísal(a): On Wed, 23 Dec 2015, Lubos Pintes wrote: Hello Mark, The result isthe same, I tried it before I wrote my message. I even tried to temporarily

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Lubos Pintes
Hello Mark, The result isthe same, I tried it before I wrote my message. I even tried to temporarily write ordinal codes of characters, it seems that a string is not automatically converted to a WideString when assigned, there wereno zeros, like H#0e#0l#0, etc. Dňa 23. 12. 2015 o 11:07 Mark

Re: [fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Michael Van Canneyt
On Wed, 23 Dec 2015, Lubos Pintes wrote: Hello Mark, The result isthe same, I tried it before I wrote my message. I even tried to temporarily write ordinal codes of characters, it seems that a string is not automatically converted to a WideString when assigned, there wereno zeros, like

[fpc-pascal] Assigning string constant to a WideString and the Format function

2015-12-23 Thread Lubos Pintes
Hello, I have a text in the WideString variable. I want to send this text to a SAPI5 synthesizer. I am doing this as follows: WideStr := Format('%s', [Pitch, Text]); Pitch is integer, Text is WideString. The result is incorrect, only a half of the Text contents is copied to the result. Tested