• I was uploading JAVA classes with dollar sign(anonymous inner classes).
    But it turns out that the dollar signs are automatically removed by the uploader.
    E.g. the url of Entrance$1.class became ~\Entrance1.class.
    I am wondering whether there is a way to change the $ key back since my java project cannot recognize Entrance1.class as Entrance$1.class and thus cannot run.

Viewing 1 replies (of 1 total)
  • Hello Dr_X,

    The issue is dollar sign is not a web / regular character and thus can’t be passed to url with no previous processing. (in general we use utf8 encoding and php_encode & decode url specific functions with WordPress).
    https://www.utexas.edu/learn/html/spchar.html

    Also, php uses dollar sign all the time so.. you’ll have troubles to translate java > php.

    A good custom regex could also work well (while working with a code editor), aka stop word is .class and then auto rewrite all before .class and then manually check what has been rewritten by regex before .class. If all ok make another regex query to finally delete .class in all code.

    Small idea, but could work quite well if regex is well done and in 2/3 steps, to avoid as much as possible false positives with dollar sign (aka regex to translate “.java” to “<?php>” string but with short boundaries, then manually move this at the front of needed lines).

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Keep Dollar Sign in File URL’ is closed to new replies.