If you're on *nix - check out the tools sed, awk, grep and split and related (or even vi). As mentioned perl could do it, so could python or PHP (or C or Java or ...) This looks more like a task for programming tools rather than a database. That's not to say you couldn't do this using PL/SQL or T-SQL or , but sometimes the most suitable tool is not within the database server (and in this case, certainly not within MySQL).
Convert the first value using user variables to load the True/False values.
Then, compare it to the value 'True'
PROPOSED SOLUTION
LOAD DATA LOCAL INFILE 'C:/bin/input.txt' INTO TABLE n1
FIELDS TERMINATED BY ',' ENCLOSED BY '\"'
LINES TERMINATED BY '\r\n' (@var1,c2)
SET c1 = (@var1 = 'True');
SAMPLE DATA
C:\bin>dir
Volume in drive C is TI10665200H
Volume Serial Number is A273-2EFF
Directory of C:\bin
10/21/2014 10:01 AM <DIR> .
10/21/2014 10:01 AM <DIR> ..
10/21/2014 10:01 AM 23 input.txt
1 File(s) 23 bytes
2 Dir(s) 685,548,244,992 bytes free
C:\bin>type input.txt
"False","1"
"True","2"
C:\bin>
CODE FOR PROPOSED SOLUTION
USE test
DROP TABLE IF EXISTS n1;
CREATE TABLE `n1` (
`c1` boolean ,
`c2` int
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
LOAD DATA LOCAL INFILE 'C:/bin/input.txt' INTO TABLE n1
FIELDS TERMINATED BY ',' ENCLOSED BY '\"'
LINES TERMINATED BY '\r\n' (@var1,c2)
SET c1 = (@var1 = 'True');
SELECT * FROM n1;
CODE FOR PROPOSED SOLUTION EXECUTED
mysql> USE test
Database changed
mysql> DROP TABLE IF EXISTS n1;
Query OK, 0 rows affected (0.14 sec)
mysql> CREATE TABLE `n1` (
-> `c1` boolean ,
-> `c2` int
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.38 sec)
mysql> LOAD DATA LOCAL INFILE 'C:/bin/input.txt' INTO TABLE n1
-> FIELDS TERMINATED BY ',' ENCLOSED BY '\"'
-> LINES TERMINATED BY '\r\n' (@var1,c2)
-> SET c1 = (@var1 = 'True');
Query OK, 2 rows affected (0.03 sec)
Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
mysql> SELECT * FROM n1;
+------+------+
| c1 | c2 |
+------+------+
| 0 | 1 |
| 1 | 2 |
+------+------+
2 rows in set (0.00 sec)
mysql>
GIVE IT A TRY !!!
Best Answer
The answer appears to be yes.
Set members are accepted if they are separated by comma, however there should be no space between the comma and the next set element.
Since commas are used to separate set members, columns must be separated by a different character. I have used tabs, and this works well.
Performance is greatly improved (roughly by a factor of 10-20), compared to joining with another table holding the set values.