Recent

Author Topic: convert old code to unicode  (Read 1929 times)

jack616

  • Sr. Member
  • ****
  • Posts: 268
convert old code to unicode
« on: February 05, 2016, 10:55:49 am »
I'm in the process of writing a program specification and am looking at
converting the old code into unicode.
I've read the wiki and other docs but am not convinced I understand
what's required enough.

So I've cut out some code with lots of the sort of thing I think I need
to be concerned about - I'm hoping someone here could convert the
lines (the code itself is a mish mash - it sort of looks real)  into unicode
so I can see what I need to do.

Also are there other things I've missed (the program itself makes a
lot of use of text manipulation)

What I am hoping to do is build a check list of things to change
or add or remove.
Clearly this is my first involvement with unicode to this degree so any
useful comments are welcome also.

Thanks


code lines follow:
Code: [Select]
{$MODE Delphi}

  myList: Tstringlist;
 
  endOfSwitch: string;
  data: string; 
  comment: string;
  twoChars: string;
  someText: string;
 
  p := pchar(someText);
 
 
  while (p <> '') and (result = true) do
  begin
     tmp := '';
     if (strlen(p) >= 2) and (p[0] = '/'))  then               
     begin                                                                     
         comment := '';
         if strlen(p) > 2 then
         for i := 2 to strlen(p) -1 do
           comment := comment + p[i];
         comment := trim(comment);
         exit;
     end;
     twoChars := p[1] + p[2];
     if (myList.IndexOf(twoChars) <> -1 ) then                     
        endOfSwitch := data;
  END;





 

TinyPortal © 2005-2018