Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit tracker = Error #929

Closed
Finch-Tamo opened this issue Jan 2, 2017 · 8 comments
Closed

Edit tracker = Error #929

Finch-Tamo opened this issue Jan 2, 2017 · 8 comments

Comments

@Finch-Tamo
Copy link

hi i have this error when i want edit the tracker ... :

https://i.imgur.com/a2IgHDQ.png

@Snegohod
Copy link
Contributor

Snegohod commented Jan 3, 2017

me too.
In version 5.4.0 everything ok.

@antekgla
Copy link
Contributor

antekgla commented Jan 3, 2017

I think what the function UTF8Decode in line 6750 is making this error.
I replace UTF8Decode with UTF8Encode in MainForm.Addtracker

        if EditMode then
          args.Add('trackerReplace', TJSONArray.Create([id, UTF8Decode(edTracker.Text)])) //UTF8Decode
        else
          args.Add('trackerAdd', TJSONArray.Create([UTF8Decode(edTracker.Text)])); //UTF8Decode

with this:

        if EditMode then
          args.Add('trackerReplace', TJSONArray.Create([id, UTF8Encode(edTracker.Text)])) //UTF8Decode
        else
          args.Add('trackerAdd', TJSONArray.Create([UTF8Encode(edTracker.Text)])); //UTF8Decode

...tested and works.

I have absolute no idea why UTF8Decode/UTF8Encode was inserted all over the code.
I know what convert between Unicode <--> RawString but I dont know why this was added now.
Maybe @leonsoft-kras could clarify his use.

Cheers

@leonsoft-kras
Copy link
Contributor

Russian characters are no longer displayed in the program during the transition from Lazarus 1.2.6 to 1.4.
I removed all the transformations (decode, encode). Programm build and work right for me.
When there was Lazarus 1.6.2, I tried to go back to the source code 5.0.1 (conversion function). Some user had problems with torrents display.
I'm somewhere made a mistake when returning conversion function.

I think we'll fix some comments and suggestions, and then we'll do another version of the program.

@leonsoft-kras
Copy link
Contributor

If the function is working, it means that the error was in the original version.
I compared the sources. ))
11111

In the author's program uses string, widestring and etc. I decided to return to the original state to avoid unexplained problems in the program.

leonsoft-kras added a commit that referenced this issue Jan 4, 2017
@antekgla
Copy link
Contributor

antekgla commented Jan 4, 2017

Yes, it is strange.
The function are in the code of 5.0.1.
I compiled that version but if you edit a torrent not fires a error. 😮

@leonsoft-kras
Copy link
Contributor

I have corrected the code as you suggested. We should be tested.

@antekgla
Copy link
Contributor

antekgla commented Jan 4, 2017

I tested with 5.5.1 changing UTF8Decode to UTF8Encode and works.
Buy I wonder why in 5.0.1 the UTF8Decode function works OK...
I keep working in this...

@leonsoft-kras
Copy link
Contributor

very strange...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants