parsing widechar string lazarus / 21-General ---------------------------------------------------------------------- alexeyneu · 2021-03-08 14:57 so i've need to grab a value from '198.45 ₽' . that's how it's done  Code: [Select]const s1 = 'äй'; const s2: string = #$C3#$A4; // ä var s3; ...   s3 := 'äöü'; ... And that's how it's really done Code: [Select]uses crt , cwstring; Var         cargo , xload : Currency; f : WideString; e , w , k , load , miles , run  : Integer; begin ReadLn(f); Val(f , cargo , e); if (e <> 0) and (Pos('₽',f) <> 0) then begin Delete(f , length(f) - 2, 7); Val(f , cargo , e); end; Writeln(cargo:3:2); end. ---------------------------------------------------------------------- Bart · 2021-03-08 21:24 And the question is? Bart ---------------------------------------------------------------------- alexeyneu · 2021-03-09 01:40 you have zero info on that .  cwstring promoted as a windows system stuff . of those two codeblocks first one is yours ---------------------------------------------------------------------- Bart · 2021-03-09 14:13 Quote from: alexeyneu on March 09, 2021, 02:40:20 amyou have zero info on that . I asked you if you had a quesion about the code or problem you posted. This part of your respons makes absolutley no sense to me at all in that context. Quote from: alexeyneu on March 09, 2021, 02:40:20 am  cwstring promoted as a windows system stuff Unit cwstring is needed as widestring manager under *nix. Quote from: alexeyneu on March 09, 2021, 02:40:20 amof those two codeblocks first one is yours I beg your pardon? Bart ---------------------------------------------------------------------- engkin · 2021-03-09 14:49 Bart, do you feel that you are talking to a machine? The code is not marked as Pascal, the first example is scraped from the wiki, and there is a space before and after every period. Not to mention the incoherent sentences. ---------------------------------------------------------------------- Bart · 2021-03-09 17:11 That (TS being a machine) would be a poor attempt then... Bart ---------------------------------------------------------------------- trev · 2021-03-09 21:44 The first code block - https://wiki.freepascal.org/Unicode_Support_in_Lazarus#String_Literals I believe the issue is more to do with an English/Russian language barrier -- Alexey might find it more profitable to use the Russian sub-forum.