- string_codes/2 with escape sequences \xXX for CR with LF

Unless you care about portability to other Prolog systems, use \uXXXX or \UXXXXXXXX instead of \x… The ISO Prolog syntax for character codes is awkward and the result means nothing as it is undefined what encoding should be respected. \u and \U are widely used is virtually all languages these days and defined to be Unicode code points.

1 Like