Jump to content

StringToBinary with _stringbetween


Recommended Posts

Hi, I have in trouble converting *.txt to original binary format. I attached my sample text file.

The one what I want is

1) If text contains "[" and "]" then Split text into array.

2) Convert StringToBinary btw "[" and "]" 

3) Convert other strings(Japanese) to Shift-JIS.

For example, like this.

$text_unicode = "すばらしい!<lf>すばらしいです、[010004300020FF]さん!"

[010004300020FF] to 0x010004300020FF and other text values into Shift-JIS.

$result = 0x82B782CE82E782B582A282C582B78141010004300020FF82B382F18149

Result in hex editor

My problem is related with this post. [Solved] Extracting text from string and reinsert it.

 

Edited by carl1905
No ones reply
Link to comment
Share on other sites

How can I convert 020000300020FF to 0x02 0x00 0x00 0x30 0x00 0x20 0xFF..? Can someone help me?

$Newtext &= Binary("0x"&$split[$i][0])

My script always returns 

$split[$i][0] = 020000300020FF to 0x30 0x32 0x30 0x30 0x30 0x30 0x33 0x30 0x30 0x30 0x32 0x30 0x46 0x46

 

Edited by carl1905
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...