Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.5
    • Component/s: Unicode
    • Labels:

      Description

      Textlib contains the code2utf8($num) function, but there's no inverse function like utf8ord($char) which can be useful for some developers.

      Here's a git branch I created for this issue:
      https://github.com/vostreltsov/moodle/commit/334e3dd5bec760d4cd52e7dd3fc490c3bba884d7

      The issue is quite trivial and should be easy to merge to the master branch.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Petr Skoda added a comment -

            Submitting for integration, thanks.

            Show
            Petr Skoda added a comment - Submitting for integration, thanks.
            Hide
            Dan Poltawski added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Valeriy Streltsov added a comment -

            Well, I hope I did it, but there were some difficulties as I'm not experienced in using git.
            First, I executed "git pull --rebase upstream master". Then I tried to "git push --all origin" but got an error:

            ! [rejected] mdl-39335 -> mdl-39335 (non-fast-forward)
            error: failed to push some refs to 'https://github.com/vostreltsov/moodle'
            hint: Updates were rejected because the tip of your current branch is behind
            hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
            hint: before pushing again.
            hint: See the 'Note about fast-forwards' in 'git push --help' for details.

            So I had to use --force to push, hoping nobody forked\merged it before
            But how am I supposed to deal with this error without using --force?
            Thanks!

            Show
            Valeriy Streltsov added a comment - Well, I hope I did it, but there were some difficulties as I'm not experienced in using git. First, I executed "git pull --rebase upstream master". Then I tried to "git push --all origin" but got an error: ! [rejected] mdl-39335 -> mdl-39335 (non-fast-forward) error: failed to push some refs to 'https://github.com/vostreltsov/moodle' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. So I had to use --force to push, hoping nobody forked\merged it before But how am I supposed to deal with this error without using --force? Thanks!
            Hide
            Petr Skoda added a comment -

            force is fine here, thanks

            Show
            Petr Skoda added a comment - force is fine here, thanks
            Hide
            Damyon Wiese added a comment -

            Thanks - this looks good. I did some extra testing on the function and it seems good.

            I tested that

            code2utf8(utf8ord('X')) == 'X' for a bunch of unicode/ascii chars

            I did note that this failed for '' - The result was a some binary empty string from code2utf8 - maybe that function should return '' for 0?

            Just comments anyway - this looks fine!

            Integrated to master.

            Show
            Damyon Wiese added a comment - Thanks - this looks good. I did some extra testing on the function and it seems good. I tested that code2utf8(utf8ord('X')) == 'X' for a bunch of unicode/ascii chars I did note that this failed for '' - The result was a some binary empty string from code2utf8 - maybe that function should return '' for 0? Just comments anyway - this looks fine! Integrated to master.
            Hide
            Damyon Wiese added a comment -

            Ran the unit tests in integration. All passed.

            Thanks!

            Show
            Damyon Wiese added a comment - Ran the unit tests in integration. All passed. Thanks!
            Hide
            Dan Poltawski added a comment -

            Thanks! You're changes are now spread to the world through this git and our source control repositories.

            No time to rest though, we've got days to make 2.5 the best yet!

            ciao

            Show
            Dan Poltawski added a comment - Thanks! You're changes are now spread to the world through this git and our source control repositories. No time to rest though, we've got days to make 2.5 the best yet! ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: