Skip Menu |
Report information
Id: 130486
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: comdog <brian.d.foy [at]>

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Mon, 2 Jan 2017 16:05:43 -0500
To: rakudobug [...]
From: brian d foy <brian.d.foy [...]>
Subject: Should an unknown encoding throw X::IO instead of X::AdHoc?
Download (untitled) / with headers
text/plain 902b
I was playing with encodings for spurt. I wanted to output some Turkish text, failed, and got an X::AdHoc exception. Should that be X::IO, or maybe something else? my $file = 'encoding_test.txt'; my $path = $*SPEC.catfile( $*SPEC.tmpdir, $file ); put "path is $path"; put "İstanbul is not Constantinople" if 'İstanbul' ne 'Constantinople'; #spurt $path, 'İstanbul', enc => 'latin9'; #spurt $path, 'İstanbul', enc => 'latin-9'; spurt $path, 'İstanbul', enc => 'iso-8859-9'; CATCH { put "Caught {.^name}: {.message}"; } I get: Caught X::AdHoc: Unknown string encoding: 'iso-8859-9' I figured that the encoding wouldn't be found because it's not listed in /src/core/Rakudo/ in the $encodings associative even though it looks like there is a passthrough as the last resort. I did not suss out who actually throws this exception.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at