How to encrypt plain message with RSA Let's say I want to use RSA to encrypt a message 'Rocket will be launched at 2am' that has 30 letters.

I use the keys from this example: https://etherhack.co.uk/asymmetric/docs/rsa_key_breakdown.html, so the modulus is 129 bytes long (1032 bits long number). So my message is shorter than the modulus and I can encrypt it.

(Let's assume I don't use padding scheme.)

What I have to do now with my message to encrypt it?

I have to convert it to a number $m$, so I use some encoding to convert each letter to byte and I concatenate the bytes? (how do I choose that, is there a convention, will encoding and endianness be written into ASN.1 keys)

According to RSA I now have to compute:
$$c(m)=m^{65537} \pmod{\text{...1032_bits_long_number...}}$$

and message is 240 bits long number. Is this the procedure?
The straight-forward way to do this is:


Convert the ASCII string into an array of bytes.
Convert that byte array into a large integer. For that you need a library with support for arbitrary large integers (e.g. BigInteger)
Endianness does not matter for this.
For encryption, the library should already offer some modular exponentiation method, because otherwise you will have to write square-and-multiply yourself, where you apply the modulus after every step.
Decryption is the same as encryption, it's just modular exponentiation again.


Of course this is just for this basic exercise. In an actuall application, you definately need:


A proper padding scheme, e.g. RSA-OAEP
You usually don't encrypt the message directly. Instead, hybrid encryption is used in all cases, so that it doesn't matter how long the message is.
Follow the standards, e.g. PKC#1, section 4 for the data conversion from integers to byte strings (thanks to @MaartenBodewes for pointing that out)
And to be honest: You should just use an implementation of RSA (and other encryption schemes) provided by a cryptographic library.