Announcement

Collapse
No announcement yet.

Ansi to Unicode DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ansi to Unicode DLL

    Hi all,
    I need a DLL like this:
    http://www.indigorose.com/forums/thr...CODE-Intrigued

    Please give me this.
    Thanks.

  • #2
    What is it your doing with Unicode strings? I ask as there is a couple of plugins that are supported that deal with Unicode should you not get this DLL.

    Comment


    • #3
      Originally posted by Shrek View Post
      What is it your doing with Unicode strings? I ask as there is a couple of plugins that are supported that deal with Unicode should you not get this DLL.
      That DLL is form days of old also might be hard to find that but ya what you trying to do might be a simple work around for what your trying to do, and hey Shrek its been sometime
      Plugins or Sources MokoX
      BunnyHop 2021 Here

      Comment


      • #4
        Hi there :yes

        Comment


        • #5
          I want to send SMS with HTTP web service.
          But my service provider doesn't support ANSI and I must convert it to Unicode.

          Can you find a Plugin or DLL file or... to convert ANSI to Unicode???
          I need this.

          Comment


          • #6
            No anyone to help me?

            Comment


            • #7
              http://www.mindquake.com.br/en/actions/unicode

              http://www.memoryex.net/

              Comment


              • #8
                How can I use MemoryEx to Convert String?

                Comment


                • #9
                  Simple answer:
                  Code:
                  String.AnsiToUnicode = function(s) 
                  	local res = nil;
                  	local len = s:len();
                  	local new = (len * 2) + 2;
                  	local buf = MemoryEx.AllocateEx(new);
                  	if(buf)then
                  		buf:String(len, MEMEX_UNICODE, s);
                  		res = buf:LString(new);
                  		buf:Free();
                  	end
                  	
                  	return res;
                  end;
                  Simple example
                  Code:
                  Debug.ShowWindow();
                  local test = String.AnsiToUnicode("Hello World!!");
                  for i = 1, test:len() do
                  	local charCode = test:byte(i);
                  	Debug.Print(charCode.."\r\n");
                  end
                  Bas Groothedde
                  Imagine Programming :: Blog

                  AMS8 Plugins
                  IMXLH Compiler

                  Comment


                  • #10
                    Originally posted by Imagine Programming View Post
                    Simple answer:
                    Code:
                    String.AnsiToUnicode = function(s) 
                    	local res = nil;
                    	local len = s:len();
                    	local new = (len * 2) + 2;
                    	local buf = MemoryEx.AllocateEx(new);
                    	if(buf)then
                    		buf:String(len, MEMEX_UNICODE, s);
                    		res = buf:LString(new);
                    		buf:Free();
                    	end
                    	
                    	return res;
                    end;
                    Simple example
                    Code:
                    Debug.ShowWindow();
                    local test = String.AnsiToUnicode("Hello World!!");
                    for i = 1, test:len() do
                    	local charCode = test:byte(i);
                    	Debug.Print(charCode.."\r\n");
                    end
                    Thank you so much for this Example.
                    I want to convert ANSI to Unicode for use in HTTP.Submit function to sent it to a php file.
                    But your example convert ANSI to strings like Number. I can't use this, I don't need Unicode number.
                    Can I Convert My String to a Readable Unicode or UTF-8?
                    My string contain Arabic or Persian Characters.

                    Comment


                    • #11
                      If you actually look at the code, you'll see that the representation of the result is only an example. The function converts ANSI data to Unicode data in a Lua string (which supports null characters). HTTP.Submit or any other AMS function usually do not support unicode data, so you'll need something else (WinAPI).

                      If you don't understand this small piece of code, I'm not sure how to help you further.
                      Bas Groothedde
                      Imagine Programming :: Blog

                      AMS8 Plugins
                      IMXLH Compiler

                      Comment

                      Working...
                      X