Ad
  • Custom User Avatar
  • Custom User Avatar
  • Default User Avatar

    Hey there!

    I guess that your not escaping correctly the test cases for c++. Could you check if you are escaping correctly special caracters in the refence string, such as backslash '\'.

    Under a certain test case, whithin the test "Now is the time for all good men to come to the aid of their country". The test shows a mismatch.

    I've tried two different implementations (With C old plain strings and C++ std::string) both return the same output. Even thought only the std::string approach works correctly on this test case. I've compared the encoded values on several tools to compare and my output look like correct.

    This is the output with the problem.

    b.data: (Now is the time for all good men to come to the aid of their country) b.n: (68)
    total_tuples: 17
    4e 6f 77 20 ENCODING! !>b2: 21 3e 62 32 3a - 'Now '
    69 73 20 74 ENCODING! =DblB 3d 44 62 6c 42 - 'is t'
    68 65 20 74 ENCODING! .<rOB 2e 3c 72 4f 42 - 'he t'
    69 6d 65 20 ENCODING! (E.lB 28 45 2e 6c 42 - 'ime '
    66 6f 72 20 ENCODING! 4]DoA 34 5d 44 6f 41 - 'for '
    61 6c 6c 20 ENCODING! &aK;@ 26 61 4b 3b 40 - 'all '
    67 6f 6f 64 ENCODING! !^_5B 21 5e 5f 35 42 - 'good'
    20 6d 65 6e ENCODING! -\kD+ 2d 5c 6b 44 2b - ' men'
    20 74 6f 20 ENCODING! ENVE+ 45 4e 56 45 2b - ' to '
    63 6f 6d 65 ENCODING! q3Hr@ 71 33 48 72 40 - 'come'
    20 74 6f 20 ENCODING! ENVE+ 45 4e 56 45 2b - ' to '
    74 68 65 20 ENCODING! .5,DF 2e 35 2c 44 46 - 'the '
    61 69 64 20 ENCODING! p60;@ 70 36 30 3b 40 - 'aid '
    6f 66 20 74 ENCODING! 6,:eD 36 2c 3a 65 44 - 'of t'
    68 65 69 72 ENCODING! umtOB 75 6d 74 4f 42 - 'heir'
    20 63 6f 75 ENCODING! 4>fC+ 34 3e 66 43 2b - ' cou'
    6e 74 72 79 ENCODING! EoKKD 45 6f 4b 4b 44 - 'ntry'

    <:2b>!BlbD=BOr<.Bl.E(AoD]4@;Ka&B5_^!+Dk-+EVNE@rH3q+EVNEFD,5.@;06pDe:,6BOtmu+Cf>4DKKoE>

    3c 7e 3a 32 62 3e 21 42 6c 62 44 3d 42 4f 72 3c 2e 42 6c 2e 45 28 41 6f 44 5d 34 40 3b 4b 61 26 42 35 5f 5e 21 2b 44 6b 5c 2d 2b 45 56 4e 45 40 72 48 33 71 2b 45 56 4e 45 46 44 2c 35 2e 40 3b 30 36 70 44 65 3a 2c 36 42 4f 74 6d 75 2b 43 66 3e 34 44 4b 4b 6f 45 7e 3e

    Could you take a look at this please?