Why does a specific emoji require 2 Characters?
or is this a bug in Oracle 23.7 FREE VirtualBox?
test code:
-- mostly AI generated code
create table Tiles (
tile_id number generated by default as identity primary key,
sql_output char(1 char), -- expected version
terrain_type varchar2(50) not null unique, -- Describes the type of terrain, e.g., 'Forest', 'Mountain'
filename varchar2(255),
tile_type varchar2(20),
constraint chk_tile_type check (tile_type in ('Area', 'Path', 'Town'))
);
insert into tiles (filename, sql_output, terrain_type, tile_type)
values ('mountain.png', '🏔️', 'Mountain', 'Area');
-- fails with ORA-12899
alter table Tiles modify sql_output char(2 char);
insert into tiles (filename, sql_output, terrain_type, tile_type)
values ('mountain.png', '🏔️', 'Mountain', 'Area');
commit;
select dump( sql_output ) dmp
from Tiles
where terrain_type = 'Mountain';
-- Typ=96 Len=7: 240,159,143,148,239,184,143
drop table Tiles purge;