User Tools

Site Tools


encoding

Syntax

encoding
encoding rule
encoding rule NONE
encoding rule encoding

Overview

The page encodings and locales discusses how to tell EPIC what encoding you are using locally.

EPIC will automatically send all your messages to IRC in UTF-8, and will automatically handle any incoming messages in UTF-8. But if you receive a non-UTF8 message, or you want to send a non-UTF8 message, you need to tell EPIC what encoding to use.

An ENCODING rule contains three parts

  1. - A server part
  2. - A slash
  3. - A target part (a nick or a channel)

Either side is optional, along with the slash. Server parts are expected to contain dots, and channels are expected to start with a channel name char (#, &, +, etc), and a nick is everything else. You should always include the slash if you think EPIC might misinterpret your nick or server as the other (such as when you use server groups – see examples below)

Syntax Forms

  /ENCODING

Show all encoding rules – there are always three built in rules (discussed below)

  /ENCODING <rule>

Show one specific rule – you must type the <rule> exactly

  /ENCODING <rule> NONE

Delete a rule

  /ENCODING <rule> <encoding>

Create a new rule using the given encoding.

RULES

ENCODING rules have overlap – so when EPIC needs to be able to choose between multiple rules, it does this:

Priority Rule Form Explanation
1 server/nickname A specific nick on a specific server
2 /nickname A specific nick on ALL servers
3 server/channel A specific channel on a specific server
4 /channel A specific channel on ALL servers
5 server/ ALL nicks and channels for a server that don't have their own rule
6 “irc” There is a builtin rule “irc” used when no other rules apply

The server part follows the same rules as /SERVER -UPDATE

  • A server refnum (a number)
  • A server “ourname”
  • A server “itsname”
  • A server group name
  • A server 005 NETWORK name
  • Any server altname

If your server description contains a port, that must match as well

Examples

  /ENCODING 4 KOI8-R

Server 4, and anybody on Server 4 that doesn't have its own rule uses KOI8-R

  /ENCODING EFNet/ CP437

Any server belonging to group “EFNet”, and anybody who doesn't have their own rule uses CP437. Note the trailing slash is necessary because otherwise “EFNet” would be considered a nickname.

  /ENCODING hop ISO-8859-1

Any hop I talk to uses ISO-8859-1

  /ENCODING EFNet/hop UTF-8

Except for the hop on EFNet, who uses UTF-8

  /ENCODING irc.rusnet.com:6679 KOI8-R

When I connect to irc.rusnet.com on port 6679, it uses KOI8-R

  /ENCODING irc.rusnet.com:6667 UTF-8

When I connect to irc.rusnet.com on port 6667, it uses UTF-8

Built In Rules

There are three built in encoding rules which you cannot delete and probably shouldn't change.

Rule Explanation
irc Any non-utf8 message received from irc is assumed to be in this encoding (default: ISO-8859-1)
console The encoding EPIC thinks you are using at the console (default: set from your locale)
scripts Any non-utf8 script you load is assumed to be this encoding (default: CP437)

History

The /ENCODING command first appeared in EPIC5-1.1.8

encoding.txt · Last modified: 2014/04/05 16:30 by sgrubnick